From: Anthony Williams (anthwil_at_[hidden])
Date: 2002-09-18 06:45:24
Markus Schöpflin writes:
> I think we have a problem with BOOST_STATIC_CONSTANT() then as it
> provides no definition (just the declaration) for the static
> constant if the macro BOOST_NO_INCLASS_MEMBER_INITIALIZATION is
> not defined.
Strictly, yes we do. However, this is one of those
it-works-in-all-compilers-and-will-hopefully-soon-be-standard features (like
assuming vectors had contiguous storage used to be). At least, it works on
compilers that support in-class initialization of static constants.
Also, in many cases, it is actually very hard to define the constant outside
the class definition.
If such usage was banned, it would just lead to a more prolific use of enums
for this purpose, which is really a hack.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk