
2 Jul
2011
2 Jul
'11
8:44 a.m.
I mean things like
struct A { static const int value = 42; };
That works correctly in the library for gcc and VC++. Evidently the code that tests, which uses an expression of &A::value, is accepted by those compilers. Is it illegal to take the address of a static const data member in C++ ?
No, but you *may* need an out-of-line definition for the member "value" if the compiler considers the address to be "used": my guess is you're only using it within the context of another metafunction, so probably this should be OK.... probably ;) HTH, John.