Subject: Re: [boost] Movable but not copyable bug?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-08-25 17:01:18
El 25/08/2014 18:08, Mostafa escribió:
> On Mon, 25 Aug 2014 03:23:59 -0700, Ion Gaztañaga <igaztanaga_at_[hidden]>
>> I also noted that you've disabled the assignment operator taking by
>> value. I have no idea on what can happen, as Boost.Move disables also
>> the copy assignment taking by non-const reference.
> Does that mean that when using BOOST_MOVABLE_BUT_NOT_COPYABLE clients
> should not delete the copy constructor or the copy assignment operator?
> If so, that should be documented.
I think it's documented:
> Also, can BOOST_COPYABLE_AND_MOVABLE be used with the copy-and-swap idiom?
I haven't tried, but I think it will work. Try avoiding a
BOOST_COPY_ASSIGN-based assignment shown here
and define your assignment taking by value.
I hope it helps,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk