Boost logo

Boost Users :

Subject: Re: [Boost-users] noncopyable and move semantics
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2011-07-29 05:05:15


> In most (if not all) of the above cases, the rules of C++0x will
> already do the right thing. If I want to allow moving but not copying,
> all I have to do is declare a move constructor. What exactly do I need
> the noise of an extra header and deriving from some boost::moveableonly
> class for?

Oh! I didn't know declaring a move constructor inhibited the generation
of a copy constructor. That's neat! And it indeed removes the need for
the boost::moveableonly that I was suggesting.
 
Guess you learn something new every day...
 
Regards,
Nate.


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