Will error C2468 be removed
The following code generates a C2468 error ('new' : cannot allocate
'const'/'volatile' objects (type is 'const int')) with both MSVC 6 and
VS.Net:
int main()
{
new const int;
return 0;
Quote:
}
However, this code is well-formed (even if it does leak). In the days
of the ARM it wasn't legal to use new to create an object that was
const or volatile, but nowadays it is - see 5.2.4/1 in the standard.
Will this be fixed in the next version of the compiler?
- Alan