[cfe-commits] Better const_cast support
sebastian.redl at getdesigned.at
Fri Sep 26 15:10:32 PDT 2008
Updated patch. Supports arrays and function pointers the same way as GCC
(as near as I can determine).
What it does not support is array decay. This fails:
const int ar;
int *pi = const_cast<int*>(ar);
This is because lvalue-to-rvalue conversion is not performed on the
argument (would lead to array decay). Is a generic facility for this in
the semantic checker somewhere? It's really indispensable for C++
The test case will now fail because I've put the above in it. I think
it's better to have a failing test than to know there's a missing
feature but eventually forget about it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the cfe-commits