id summary reporter owner description type status milestone component version severity resolution keywords cc 12307 Copy assignment from const ref handled differently in C++11/C++98 a.grund@… Ion Gaztañaga "There is a difference in the handling of copy assignment when using Boost.Move between C++11 and C++98: {{{ #include #include class Foo{ BOOST_COPYABLE_AND_MOVABLE(Foo) public: int i; explicit Foo(int val): i(val){} Foo(BOOST_RV_REF(Foo) obj): i(obj.i) {} Foo& operator=(BOOST_RV_REF(Foo) rhs){ i = rhs.i; rhs.i = 0; return *this; } Foo& operator=(BOOST_COPY_ASSIGN_REF(Foo) rhs){ i = rhs.i; return *this; } //(1) template Foo& operator=(const OTHER& rhs){ i = rhs.j; return *this; } //(2) }; struct Bar{ int j; explicit Bar(int val): j(val){} }; int main(){ Foo foo2(2); // Working cases Foo foo1(1); Bar bar(3); assert(foo1.i == 1); assert(foo2.i == 2); assert(bar.j == 3); foo2 = foo1; assert(foo1.i == 1); assert(foo2.i == 1); foo1 = bar; assert(foo1.i == 3); foo2 = boost::move(foo1); assert(foo1.i == 0); assert(foo2.i == 3); // BUG const Foo foo4(4); foo2 = foo4; // Calls (1) in C++11 but (2) in C++98 which fails assert(foo2.i == 4); assert(foo4.i == 4); return 0; } }}} This is slighlty different than https://svn.boost.org/trac/boost/ticket/12194 which was fixed with https://github.com/boostorg/move/pull/9 but kind of releated." Bugs closed To Be Determined move Boost 1.59.0 Problem fixed