I am wondering how C ++ uses the const keyword.
I have the following function definition. Which in itself looks completely insane, but it works fine.
const int const * const Get(){ return new int(1); } const
I know what each placement of a constant means, this question is not about the value of the placement of the const keyword.
I am very confused about using const keywords because you can duplicate them.
const int const const * const Get(){ return new int(1); } const
const const int const const * const const Get(){ return new int(1); } const const
const const const int const const const * const const const Get(){ return new int(1); } const const const
Why does language allow you to do this?
EDIT: This code can be compiled in Visual Studio 2013, the Visual C ++ Compiler. I am not sure about the actual name of the compiler.
EDIT2: So the answer is that this is against the standard. The code compiles without using the option /Za.
I vote to close the question.