
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: http://lists.boost.org/boost-users/2011/07/69621.php 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: class moveonly { protected: moveonly() = default; moveonly(moveonly&&) = default; moveonly& operator=(moveonly&&) = default; // implicit // 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". Ben