29 Jul
2009
29 Jul
'09
7:39 p.m.
AMDG Mathias Gaunard wrote:
Because static const <integral type> = <some value> members are quite special beasts. Indeed, unlike other static members, you can't take their address, since they don't exist in memory but only as compile-time constants.
Yes you can take the address of a static const integral type. If you do, you are required to have a namespace scope definition, just like an ordinary member, but failure to do so, can only cause a linker error. It won't affect the compiler. In Christ, Steven Watanabe