Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-09-26 09:46:49


Björn Karlsson wrote:
>
> > From: Markus Schöpflin [mailto:markus.schoepflin_at_[hidden]]
> [snip]
> > Please, please, please, don't change the config. I just
> > managed to get it
> > turned off. :-) It breaks for all usages where the enum value
> > won't fit
> > in a normal integer...
> >
> > I can provide patches as I encounter problems or as problems
> > are reported
> > to me, but please don't change the config.
> >
> > Markus
>
> I was afraid you'd say that...
> I'll apply the patches (for bool_c and integral_c) that started this thread.

Thanks, at least it won't break anything. :-) It isn't illegal even
after the standard changed.

> So, should we augment these ~800 BOOST_STATIC_CONSTANTs? If that's what we
> decide to do, I'd like to wait until 1_29_0 is shipping, and everything has
> been merged back to the trunk. And there'll be a new macro
> (BOOST_STATIC_CONSTANT_DEFINITION, or similar) to streamline usage.

I just discovered something totally new to me. I posted in another message
that (quoting myself):

> The basic problem is, IBM's vacpp 5 can't do this:
>
> template <bool b> struct foo
> {
> static const bool v = b;
> };
>
> template <bool b> struct bar
> {
> static const bool v1 = b;
> static const bool v2 = foo<v1>::v;
> };
>
> It works if you replace foo<v1>::v with foo<b>::v.

Now I just discovered another workaround for this. It also works
if you use enum { v1 = b } and enum { v2 = foo<v1>::v }.

Which of course speaks in favour of enabling the workaround
for this compiler despite it breaking other things.

I'm just running regression tests against RC 1.29.0 to see how
bad it really is.

>
> I'd really like some more opinions on this issue (because it does have an
> effect on most libraries).
>
> Constantly and statically yours,
>
> Bjorn Karlsson
> _______________________________________________

Markus


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