2009/6/17 Maxim Koshelev <chuchelo@gmail.com>
In common case it is not compiller solution due to complexity of
constructors/destructors of holded class.

variant<A,B> v( B() );

Note that this code does not create an instance of variant<A,B>, but declares a function.
 

this code MUST call constructor of class B two times. First time when
B is created, second time when just created instance of B copyied to
variant. Valid solution is use type-traits. Something like:

variant<A,B> v( Trait<B>())

Same here.
 
Roman Perepelitsa.