[Assorted-commits] SF.net SVN: assorted:[1263] cpp-commons/trunk/src/boost/unique_ptr.hpp
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-06 21:16:20
|
Revision: 1263 http://assorted.svn.sourceforge.net/assorted/?rev=1263&view=rev Author: yangzhang Date: 2009-03-06 21:16:17 +0000 (Fri, 06 Mar 2009) Log Message: ----------- resolved ambiguous move() between std and boost Modified Paths: -------------- cpp-commons/trunk/src/boost/unique_ptr.hpp Modified: cpp-commons/trunk/src/boost/unique_ptr.hpp =================================================================== --- cpp-commons/trunk/src/boost/unique_ptr.hpp 2009-03-06 20:54:16 UTC (rev 1262) +++ cpp-commons/trunk/src/boost/unique_ptr.hpp 2009-03-06 21:16:17 UTC (rev 1263) @@ -132,7 +132,7 @@ >::type forward(typename detail_unique_ptr::identity<T>::type& t) { - return move(t); + return boost::move(t); } template <class T> @@ -144,7 +144,7 @@ >::type forward(const typename detail_unique_ptr::identity<T>::type& t) { - return move(const_cast<T&>(t)); + return boost::move(const_cast<T&>(t)); } namespace detail_unique_ptr { @@ -167,10 +167,10 @@ unique_ptr_storage() : t1_(), t2_() {} explicit unique_ptr_storage(T1 t1) - : t1_(move(t1)), t2_() {} + : t1_(boost::move(t1)), t2_() {} unique_ptr_storage(T1 t1, T2 t2) - : t1_(move(t1)), t2_(forward<T2>(t2)) {} + : t1_(boost::move(t1)), t2_(forward<T2>(t2)) {} T1& first() {return t1_;} const T1& first() const {return t1_;} @@ -194,10 +194,10 @@ unique_ptr_storage() : t1_() {} explicit unique_ptr_storage(T1 t1) - : t1_(move(t1)) {} + : t1_(boost::move(t1)) {} unique_ptr_storage(T1 t1, T2 t2) - : t2_(move(t2)), t1_(move(t1)) {} + : t2_(boost::move(t2)), t1_(boost::move(t1)) {} T1& first() {return t1_;} const T1& first() const {return t1_;} @@ -316,7 +316,7 @@ unique_ptr& operator=(detail_unique_ptr::rv<unique_ptr> r) { reset(r->release()); - ptr_.second() = move(r->get_deleter()); + ptr_.second() = boost::move(r->get_deleter()); return *this; } @@ -335,7 +335,7 @@ unique_ptr(pointer p, typename mpl::if_<is_reference<D>, volatile typename remove_reference<D>::type&, D>::type d) - : ptr_(move(p), forward<D>(const_cast<typename add_reference<D>::type>(d))) {} + : ptr_(boost::move(p), forward<D>(const_cast<typename add_reference<D>::type>(d))) {} template <class U, class E> unique_ptr(unique_ptr<U, E> u, @@ -364,7 +364,7 @@ operator=(unique_ptr<U, E> u) { reset(u.release()); - ptr_.second() = move(u.get_deleter()); + ptr_.second() = boost::move(u.get_deleter()); return *this; } @@ -418,7 +418,7 @@ unique_ptr& operator=(detail_unique_ptr::rv<unique_ptr> r) { reset(r->release()); - ptr_.second() = move(r->get_deleter()); + ptr_.second() = boost::move(r->get_deleter()); return *this; } @@ -437,7 +437,7 @@ unique_ptr(pointer p, typename mpl::if_<is_reference<D>, volatile typename remove_reference<D>::type&, D>::type d) - : ptr_(move(p), forward<D>(const_cast<typename add_reference<D>::type>(d))) {} + : ptr_(boost::move(p), forward<D>(const_cast<typename add_reference<D>::type>(d))) {} ~unique_ptr() {reset();} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |