I have such code:
class A { public: unsigned long a; static const unsigned long b = sizeof(a); // \"error C2327: \'A::a\' : is not a type name, static,
static const-qualified member in-class initialisers using non-static members were not part of the C++ standard until C++11.
static
const
The earliest MSVC compiler that fully supports C++11 is MSVC2017.
That compiler will compile your code correctly.