Boost logo

Boost :

Subject: Re: [boost] static in_class constants
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-03-13 12:59:44


Hi there, thanks to all replies.

> 1) What is "type", it's not declared anywhere in the snippet above.

Sorry, my mistake. Type is uint32_t.

> 2) I notice you saying that you're getting linker errors - that should only
> happen if you're taking the address of the constants somewhere - if that's a
> use case that you want to support, then you need a definition for the
> constants somewhere - suitably guarded by the right Boost.Config macros
> (sorry can't remember what off the top of my head).

I'm getting a compiler error with gcc 3.4.5. The compiler that comes with MinGW.

>
> And finally, given that your constants look like enumerated values, is there
> actually a pressing need not to make them an anonymous enumerated type in
> this case?

I know about using enums for such a case. But it used to be a matter
of taste since MS compiler works just fine. Seems like now it's a
necessity to use enum. I was wondering how other boost libs do it?

Regards,
Christian


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