Boost logo

Boost :

From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2001-06-30 16:07:32


Jens Maurer wrote:
> Note that issue 48 deals only with places "where an integral
> constant expression is required". Thus, sizing a C-style array
> doesn't need the out-of-line definition, but using it in an
> "ordinary" expression such as "if(i)" does require the definition.

Yes, I noticed that, and I thought that this is not a problem, because
BOOST_STATIC_CONSTANT should be used to define only "true" compile-time
constants, the ones that are intended to be used in integral constant
expressions, and why one would write a runtime check when a compile-time one
is available anyway? :). But probably where are cases when people do want to
do that (numeric_limits<> users?), so I am inclined to think that the
proposed resolution of the issue is an unfortunate one. In particular, text
at the beginning seems to be much more reasonable:

<quote>
In particular, if an integral/enum const static data member is initialized
within the class, and its address is never taken, we agreed that no
namespace-scope definition was required.
</quote>

Are there any ways to re-open the issue?

Aleksey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk