Bjarne explains why const can go either before or after a type.
http://www.stroustrup.com/bs_faq2.html#constplacement
"const T" and "T const" were - and are - (both) allowed and equivalent. [...]
Why? When I invented "const" (initially named "readonly" and had a corresponding "writeonly"), I allowed it to go before or after the type because I could do so without ambiguity.
My immediate thought was, "Ok, that makes sense, but if that's the reason then why is const special?" Apparently it isn't. Both clang and gcc emit no warnings for the following.
int volatile myint;
int static myotherint;
It makes sense that this would be valid but I've never seen this syntax used or even mentioned as a possibility. Is placing static and volatile qualifiers after a type valid C++?
How would one determine this from the text of the Standard?
int* static ptr2;
is not a valid declaration. – Lupus