
11 Jan
2013
11 Jan
'13
2:59 p.m.
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.