Subject: Re: [boost] noncopyable && C++11
From: Ben Pope (benpope81_at_[hidden])
Date: 2012-07-06 04:01:54
On Friday, July 06, 2012 03:26 PM, Ben Pope wrote:
> boost::noncopyable interferes with the implicit generation of move
Hmm, I see this was discussed before:
Which I failed to find first time I searched.
There is still the case where I want to prevent copying (but allow
moving), and boost::noncopyable was what I used before move semantics.
I guess we could have:
moveonly() = default;
moveonly(moveonly&&) = default;
moveonly& operator=(moveonly&&) = default;
// moveonly(moveonly const&) = delete;
// moveonly& operator=(moveonly const&) = delete;
So that there is an expressive and concise form of "I want this to have
default move semantics without being copyable".
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk