29 Jul
2011
29 Jul
'11
9:05 a.m.
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.