
Olaf Peter wrote:
Hi Ion,
I've uploaded a new version of the move emulation library to sandbox. I've put it temporarily in "move_semantics" folder to avoid overwriting current move code.
what is the differnet to Adobe's move library (http://stlab.adobe.com/group__move__related.html) ??
The emulation is different because Adobe's library "move" returns T: T move(T &t); This library (credits to David Abrahams) returns a pseudo-rvalue reference: boost::rv<T> & move(T &t); so there is a way to implement forwarding without any intermediate copy or move and to modify the original value instead of creating a temporary one. For example Adobe.Move containers need to implement push_back by value: push_back(T t); whereas with this library we can implement it in a more C++0x-like approach: push_back(const T &t); push_back(BOOST_RV_REF(T)t); which will provide an easier transition to C++0x code.
Regards, Olaf
Best, Ion