As you wrote it, he said that the value of the returned pointer is const. But the values โโof the non-class class do not change (inherited from C), and thus the standard says that the values โโof the non-class class are never const-qual (the rightmost const was ignored even by the one you specified), since const will be a little redundant, do not write it - for example:
int f(); int main() { f() = 0; }
Note that for type "g" the constant is significant, but for rvalue expressions generated from type int const , const is ignored. So the following error:
int const f(); int f() { }
I do not know that you could observe "const", except to get the type "g" (and pass &f to the template and print its type, for example). Finally, note that โchar constโ and โconst charโ mean the same type. I recommend that you deal with one concept and use it throughout the code.
Johannes Schaub - litb Oct 22 '09 at 13:31 2009-10-22 13:31
source share