Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2004-07-12 14:15:47

On Jul 12, 2004, at 1:37 PM, Toon Knapen wrote:

> John Maddock wrote:
>>> I wonder if it's possible to use preprocessor tricks to have
>>> BOOST_STATIC_CONSTANT generate enums (on IBM only) whenever they will
>>> fit? After all, integral constants _can_ be managed by the
>>> preprocessor.
>> So they can, but not with BOOST_STATIC_CONSTANT as is:
>> BOOST_STATIC_CONSTANT(long long, value = 0ULL);
>> as far as I know there's no way to do different things depending upon
>> the
>> second argument here, but I'd love to be proved wrong (and be very
>> impressed
>> as well!).
> We already have BOOST_WORKAROUND. What I can do is provide a
> BOOST_WORKAROUND that will use an enum if the datatype is not too
> wide. Simple but effective!
> historical note: The reason I brought this up was because Mathias
> Troyer asked me to remove the BOOST_NO_INCLASS_MEMBER_INITIALIZATION
> in the config for vacpp version 6. And indeed, vacpp can handle the
> initialization but does not comply with the DR (so one can argue if
> BOOST_NO_INCLASS_MEMBER_INITALIZATION should be defined or not).
> Defining it however caused a problem in the random library however
> (Mathias can you recall what exactly happened and why).

Yes, the problem was that one of the constants was intialized with a
64-bit constant, and that did not fit into an int. If it is important I
could reproduce it tomorrow and report it.


Boost list run by bdawes at, gregod at, cpdaniel at, john at