El 25/08/2014 18:08, Mostafa escribió:
On Mon, 25 Aug 2014 03:23:59 -0700, Ion Gaztañaga
wrote: [snip]
I also noted that you've disabled the assignment operator taking by value. I have no idea on what can happen, as Boost.Move disables also the copy assignment taking by non-const reference.
Does that mean that when using BOOST_MOVABLE_BUT_NOT_COPYABLE clients should not delete the copy constructor or the copy assignment operator? If so, that should be documented.
I think it's documented: http://www.boost.org/doc/libs/1_56_0/doc/html/move/movable_only_classes.html http://www.boost.org/doc/libs/1_56_0/doc/html/BOOST_MOVABLE_BUT_NOT_COPYABLE...
Also, can BOOST_COPYABLE_AND_MOVABLE be used with the copy-and-swap idiom?
I haven't tried, but I think it will work. Try avoiding a BOOST_COPY_ASSIGN-based assignment shown here http://www.boost.org/doc/libs/1_56_0/doc/html/move/implementing_movable_clas... and define your assignment taking by value. I hope it helps, Ion