Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::mpl, c++11 and clang 3.0: compiler bug?
From: Allan Nielsen (a_at_[hidden])
Date: 2012-01-17 12:05:33


On Tue, Jan 17, 2012 at 4:45 PM, Philipp Moeller
<philipp.moeller_at_[hidden]> wrote:
> 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());

I got a compile error on this, but tried the following instead:

int i;
AccSize < Foo > p;
p(i);
p(i);
p(i);

But as Sebastian can inform it works in Clang SVN-HEAD, then it is
properly a bug in clang 3.0.

Regards
Allan W. Nielsen


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