
25 Nov
2010
25 Nov
'10
7:01 a.m.
Shouldn't this function use boost::move?
X X::create() { boost::shared_ptr< impl_t > impl( new impl_t() ); return boost::move( X( impl) ); }
should work without move
Shouldn't this declaration use boost::move?
X x( boost::move(X::create()) );
Or shouldn't X::create returns a rvalue to X?
should work without move - returns an rvalue BOOST_MOVABLE_BUT_NOT_COPYABLE provides operators returning rv< X >. g++-4.4.5 accepts code above and afaik msvc-9.0 (on32bit windows) too. Oliver -- GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl