Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::mpl, c++11 and clang 3.0: compiler bug?
From: Philipp Moeller (philipp.moeller_at_[hidden])
Date: 2012-01-17 10:45:48


Allan Nielsen <a_at_[hidden]> writes:

> If I remove the copy constructor in Foo, it works as I expect, and if
> I do a "normal" initialization of AccSize::s it also works as I
> expect.
>
> Is this a bug? If so, how can it be reproduced without mpl::foreach

The code works as expected (after removing the non-static member
initializer) on gcc and this is the behaviour that is expected.

To test without mpl::for_each just unroll the loop:

    AccSize < Foo > p;

    p(int());
    p(int());
    p(int());

>
> Best regards
> Allan W. Nielsen
>

Cheers,
Philipp Moeller


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net