Boost logo

Boost :

Subject: Re: [boost] [variant] Basic rvalue and C++11 features support
From: Peter Dimov (lists_at_[hidden])
Date: 2013-01-11 09:59:08

Larry Evans wrote:
> Are you suggesting that move is enabled only if the current tag (the
> variant<*>::which() result) indicates the current type is default
> constructable?

No, I'm suggesting that move (in the presence of recursive_wrappers) can be
enabled only when there is at least one type that is
nothrow-default-constructible, regardless of whether it's current.

typedef variant<int, recursive_wrapper<foo>> V;

V v1( std::move(v2) );

This move-constructs v1 from v2 and leaves int() into v2.

Boost list run by bdawes at, gregod at, cpdaniel at, john at