Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-29 18:43:26


I know we discussed this issue. If we had a search engine up and
running, I'd just refer this guy to our rationale. In the meantime, is
there anyone who remembers the discussion and would like to follow up to
comp.std.c++?

Thanks,
Dave

----- Original Message -----
From: "Ruslan Abdikeev" <ruslan_abdikeevREMOVE_IT_at_[hidden]>

> Hello,
>
> In 9.4.2/4, C++ standard explicitly requires to have a namespace
> scope definition of used static const data member of integral type,
> even if it has a constant-initializer.
>
> That is,
>
> struct A
> {
> static const int x = 7;
> };
>
> requires to have somewhere
>
> const int A::x;
>
> if value of A::x is used.
>
> However, Boost (www.boost.org) does not follow this practice.
> For C++ implementations that support constant-initializers
> it declares static const data members with const-initializers
> (but does never define it).
> Otherwise, it uses "enum" workaround.
>
> Boost is a high-quality library which is overparticular to
> standard compliance and non-standard extensions,
> so I was very surprised to spot this issue.
>
> Is it a Boost's fault, or it is my misunderstanding of standard?
>
> Sincerely,
> Ruslan Abdikeev
> VR-1 Entertainment Corp.
> http://www.vr1.com/
>
>
>
> ---
> [ comp.std.c++ is moderated. To submit articles, try just posting
with ]
> [ your news-reader. If that fails, use
lto:std-c++@ncar.ucar.edu ]
> [ --- Please see the FAQ before
             ]
> [ FAQ:
arch.att.com/~austern/csc/faq.html ]
>


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