Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2004-10-25 20:44:27


Joaquín Mª López Muñoz writes:
> I've been investigating the problem a little further, and the final
> results are these:
>
> Seems like handling of MPL lambda expressions is difficult
> with GCC 2.95. The following snippet:
>
> typedef transform1<
> vector<char,int,double>,
> XXX
> >::type t1;
>
> has several outcomes depending on XXX
> 1. identity<_1>: OK
> 2. mpl::sizeof<_1>: complains about an expression not being constant.
> However, code like this is embedded into Boost.Variant and seems to
> work fine (??)
> 3. boost::alignment_of<_1>: ICEs like I previously described. This is
> the error Boost.Variant is currently running into.
>
> My skills are too limited to be able to find a reason for this behavior, so
> I hope people smarter than me can do something with this.
>
> In case this problem is finally *not* taken care of, I've managed to
> workaround the regressions in Boost.Variant with a patch to be
> applied to boost/variant/variant.hpp (attached). Basically, the
> patch avoids the use of boost::aligment_of<_1> in favor of
> a more traditional metafunction class.
>
> So, if someone is able to fix this problem by touching either MPL
> or type_traits, so much the better.

Joaquín,

Thank you for investigating this! I'll dig a little further into it
later tonight to see if we can fix it in MPL.

> Otherwise, does anybody see
> a problem with me commiting the patch to Boost.Variant?

Nope, but let me try the above first.

--
Aleksey Gurtovoy
MetaCommunications Engineering

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