Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-05-06 21:04:44


Aleksey Gurtovoy <agurtovoy_at_[hidden]> writes:

> David Abrahams wrote:
>> > Looks good. I've applied it.
>>
>> Maybe we should be treating Sun in the config as though it doesn't
>> support in-class static constant initialization (so
>> BOOST_STATIC_CONSTANT generates an enum)? It seems like trying to
>> track down all these cases piecemeal is going to be a losing battle.
>
> But then Sun is right to complain there, isn't it? It's true that there are
> a lot of places where we are using BOOST_STATIC_CONSTANT without the
> corresponding and appropriately guarded definition, but if we adopt the
> strategy you suggest, in the end, as more and more compilers will enforce
> the rule, we will end up with enums everywhere; which kind of defeats the
> purpose of the macro - if I thought the enums are the way to go, I would
> never use BOOST_STATIC_CONSTANT in the first place.

I was under the impression that a DR had been approved which clarifies
the point so that if the address of the constant is never needed, no
definition is needed either. If I'm mistaken about that, then I'd be
inclined to agree with you.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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