Boost logo

Boost :

Subject: Re: [boost] [move] problem with msvc and BOOST_MOVABLE_BUT_NOT_COPYABLE
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2010-05-28 19:29:44


Oliver Kowalke wrote:
> Thomas Klimpel wrote:
> > Please also understand my position that everybody is allowed to make
> > mistakes, but he shouldn't blame Boost.Move or its documentation for
> > it.
> Did I blame boost.move?

Nobody blamed boost.move directly, but there were many constructive suggestions how boost.move could be improved in the face of this simple mistake.

I got the impression that the discussion blamed BOOST_MOVABLE_BUT_NOT_COPYABLE, so I pointed out that BOOST_COPYABLE_AND_MOVABLE runs into performance problem for the cases where BOOST_MOVABLE_BUT_NOT_COPYABLE runs into link problems, and you can't blame boost.move for this.

> maybe the docu should be more clear in this point

My initial though was that the docu should provide references to existing external documentation where such things are explained in sufficient detail. After this discussion, I ask myself whether the documentation should say something about RVO (or call is URVO if you want) versus NRVO.

The idea by Ilya Sokolov to modify the signature of the private copy constructor and assignment operator in boost::noncopyable to a non-const reference actually seems to make perfect sense. After all, a class that is movable can still be noncopyable, so why not use boost::noncopyable to incidate that it is noncopyable? Well, it will only work after applying the suggested "fix" to boost::noncopyable.

Regards,
Thomas


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk