From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-09-18 09:05:43
On Wed, 18 Sep 2002 12:45:24 +0100, Anthony Williams
>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.
Don't worry, I have noticed that this reply was sent before the one in
which you say you checked that DR 48 is now a recognized defect :-).
Anyhow I would add that, due to the odd wording of the resolution, we
still have - in theory - a problem with *the use* of
BOOST_STATIC_CONSTANT (though I doubt that a sane compiler writer
would adhere so slavishly to the wording): the paragraph now states
"An expression is potentially evaluated unless it appears where
an integral constant expression *is required*"
So, if you write:
const int n = A<int>::value;
then A<int>::value is evaluated because the above is not a context
where a constant is *required*. I think this effect is not the intent
of the resolution but...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk