Boost logo

Boost :

Subject: Re: [boost] [move] problem with msvc and BOOST_MOVABLE_BUT_NOT_COPYABLE
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2010-05-29 04:32:10


Am 29.05.2010 01:29, schrieb Thomas Klimpel:
> 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.

I would say in section 'Movable but Non-Copyable Types' - after the
example with the factory methods - 'In the above example, the underlying
file handle is passed from object to object, as long as the source
file_descriptor is an rvalue. At all times, there is still only one
underlying file handle, and only one file_descriptor owns it at a
time.' I would suggest to add a comment here about NRVO/URVO and the
hint to return the object via boost.move().


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