Is the following legal C++ code:
class C
{
static public int x;
};
It compiles OK in Visual Studio 2008 C++ and Visual Studio 2010 C++ (beta 2). But the static member x does not end up being public.
In Visual Studio 2010 beta 2 the experience is even stranger. Intellisense reports an error "expected an identifier", but the compiler does not. Visual Studio 2008 does not give any error.
So the questions are:
Is this legal C++ code? What does it mean?