Boost logo

Boost :

Subject: Re: [boost] [type_erasure] move
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2013-07-29 17:15:35


> AMDG
>
> On 07/29/2013 12:37 PM, Christophe Henry wrote:
>> Hi Steven,
>> I'm looking for a crash I get in my own code with g++4.8.1 (4.5 - 4.7 are
>> ok). Maybe you can help me:
>> - there is a copy_constructible concept, but no moveable. Is it enough to
>> add one on the same model? It looks like you std::forward so I'd say yes.
>> Correct?
>> template<class T = _self>
>>
>> struct move_constructible :
>>
>> ::boost::mpl::vector<constructible<T(T&&)>, destructible<T> >
>>
>> {};
>>
>
> I believe that this should work. However,
> overloading const T& and T&& only works
> with clang. (It might work with gcc-4.8,
> if I enable it. When I wrote the code I
> only had gcc-4.7.).

I'm willing to try it out as I have a gcc-4.8.1 at hand. How do I do this?

>> - If I std::move a copy_constructible any type by accident, what do I
>> get?
>> A copy? A crash?
>>
>
> It should do a copy. I tried hard to make
> overload resolution behave the same as it
> would with real references.
>
> In Christ,
> Steven Watanabe

Hmmm ok then I need to have a closer look at my crash.

Thanks,
Christophe


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