Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76040 - trunk/boost/thread/detail
From: vicente.botet_at_[hidden]
Date: 2011-12-18 09:34:09


Author: viboes
Date: 2011-12-18 09:34:09 EST (Sun, 18 Dec 2011)
New Revision: 76040
URL: http://svn.boost.org/trac/boost/changeset/76040

Log:
Thread: added move definition when BOOST_NO_RVALUE_REFERENCES is not defined
Text files modified:
   trunk/boost/thread/detail/move.hpp | 20 ++++++++++++++++++--
   1 files changed, 18 insertions(+), 2 deletions(-)

Modified: trunk/boost/thread/detail/move.hpp
==============================================================================
--- trunk/boost/thread/detail/move.hpp (original)
+++ trunk/boost/thread/detail/move.hpp 2011-12-18 09:34:09 EST (Sun, 18 Dec 2011)
@@ -9,12 +9,26 @@
 #ifndef BOOST_NO_SFINAE
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/remove_reference.hpp>
 #endif
 
 #include <boost/config/abi_prefix.hpp>
 
 namespace boost
 {
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+
+ template <class T>
+ typename remove_reference<T>::type&&
+ move(T&& t)
+ {
+ typedef typename remove_reference<T>::type Up;
+ return static_cast<Up&&>(t);
+ }
+
+#else
+
     namespace detail
     {
         template<typename T>
@@ -46,13 +60,15 @@
         return detail::thread_move_t<T>(t);
     }
 #endif
-
+
     template<typename T>
     detail::thread_move_t<T> move(detail::thread_move_t<T> t)
     {
         return t;
     }
-
+
+#endif
+
 }
 
 #include <boost/config/abi_suffix.hpp>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk