
16 Jul
2012
16 Jul
'12
8:09 p.m.
El 16/07/2012 13:54, Krzysztof Czainski escribió:
Version 1: C++03 vs. C++0x: - the last 4 use cases {{{ ptr<A> b = make_b(); ptr<A> c( make_b() ); a = make_a(); b = make_b(); }}} introduce a deep copy in version C++03, while while the deep copy is avoided in C++0x.
Thanks for the report. It's a pity that current move emulation does not catch rvalues of convertible types to avoid the copy. Maybe for the last two cases you could try with BOOST_COPY_ASSIGN_REF(ptr<U>) to see if the deep copy is avoided. Best, Ion