|
Boost : |
Subject: Re: [boost] [variant] Basic rvalue and C++11 features support
From: Eric Niebler (eric_at_[hidden])
Date: 2013-01-07 21:45:52
On 1/7/2013 12:14 PM, Paul Smith wrote:
> A recursive_wrapper is not a pointer. It's a value-like wrapper
> that is assumed to always contain a valid object. The move
> constructor should leave the moved-from recursive_wrapper
> in a valid state, which precludes nullifying it.
Paul, I think you are confused about move semantics. Joel and Hartmut
are right. Nobody should ever be seeing a moved-from object. Move
constructors and assignment operators exist precisely to enable this
kind of optimization.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk