Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59699 - in trunk: boost/thread boost/thread/detail boost/thread/pthread boost/thread/win32 libs/thread/test
From: anthony_at_[hidden]
Date: 2010-02-16 09:57:31


Author: anthonyw
Date: 2010-02-16 09:57:30 EST (Tue, 16 Feb 2010)
New Revision: 59699
URL: http://svn.boost.org/trac/boost/changeset/59699

Log:
Changed boost.thread to use BOOST_NO_RVALUE_REFERENCES rather than BOOST_HAS_RVALUE_REFS
Text files modified:
   trunk/boost/thread/detail/thread.hpp | 8 ++++----
   trunk/boost/thread/future.hpp | 12 ++++++------
   trunk/boost/thread/locks.hpp | 16 ++++++++--------
   trunk/boost/thread/pthread/thread_heap_alloc.hpp | 2 +-
   trunk/boost/thread/win32/thread_heap_alloc.hpp | 2 +-
   trunk/libs/thread/test/test_futures.cpp | 4 ++--
   6 files changed, 22 insertions(+), 22 deletions(-)

Modified: trunk/boost/thread/detail/thread.hpp
==============================================================================
--- trunk/boost/thread/detail/thread.hpp (original)
+++ trunk/boost/thread/detail/thread.hpp 2010-02-16 09:57:30 EST (Tue, 16 Feb 2010)
@@ -39,7 +39,7 @@
             public detail::thread_data_base
         {
         public:
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
             thread_data(F&& f_):
                 f(static_cast<F&&>(f_))
             {}
@@ -119,7 +119,7 @@
 
         detail::thread_data_ptr get_thread_info() const;
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename F>
         static inline detail::thread_data_ptr make_thread_info(F&& f)
         {
@@ -150,7 +150,7 @@
         thread();
         ~thread();
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template <class F>
         thread(F&& f):
             thread_info(make_thread_info(static_cast<F&&>(f)))
@@ -343,7 +343,7 @@
         return lhs.swap(rhs);
     }
     
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     inline thread&& move(thread&& t)
     {
         return t;

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2010-02-16 09:57:30 EST (Tue, 16 Feb 2010)
@@ -219,7 +219,7 @@
         struct future_traits
         {
             typedef boost::scoped_ptr<T> storage_type;
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
             typedef T const& source_reference_type;
             struct dummy;
             typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,T&&>::type rvalue_source_type;
@@ -633,7 +633,7 @@
         ~unique_future()
         {}
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         unique_future(unique_future && other)
         {
             future.swap(other.future);
@@ -768,7 +768,7 @@
             future=other.future;
             return *this;
         }
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         shared_future(shared_future && other)
         {
             future.swap(other.future);
@@ -930,7 +930,7 @@
         }
 
         // Assignment
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         promise(promise && rhs):
             future_obtained(rhs.future_obtained)
         {
@@ -1064,7 +1064,7 @@
         }
 
         // Assignment
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         promise(promise && rhs):
             future_obtained(rhs.future_obtained)
         {
@@ -1284,7 +1284,7 @@
         }
 
         // assignment
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         packaged_task(packaged_task&& other):
             future_obtained(other.future_obtained)
         {

Modified: trunk/boost/thread/locks.hpp
==============================================================================
--- trunk/boost/thread/locks.hpp (original)
+++ trunk/boost/thread/locks.hpp 2010-02-16 09:57:30 EST (Tue, 16 Feb 2010)
@@ -248,7 +248,7 @@
         {
             timed_lock(target_time);
         }
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         unique_lock(unique_lock&& other):
             m(other.m),is_locked(other.is_locked)
         {
@@ -416,7 +416,7 @@
         friend class upgrade_lock<Mutex>;
     };
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     void swap(unique_lock<Mutex>&& lhs,unique_lock<Mutex>&& rhs)
     {
@@ -430,7 +430,7 @@
     }
 #endif
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     inline unique_lock<Mutex>&& move(unique_lock<Mutex>&& ul)
     {
@@ -535,7 +535,7 @@
             return *this;
         }
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         void swap(shared_lock&& other)
         {
             std::swap(m,other.m);
@@ -629,7 +629,7 @@
 
     };
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     void swap(shared_lock<Mutex>&& lhs,shared_lock<Mutex>&& rhs)
     {
@@ -775,7 +775,7 @@
     };
 
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     unique_lock<Mutex>::unique_lock(upgrade_lock<Mutex>&& other):
         m(other.m),is_locked(other.is_locked)
@@ -875,7 +875,7 @@
             try_lock_wrapper(Mutex& m_,try_to_lock_t):
                 base(m_,try_to_lock)
             {}
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
             try_lock_wrapper(try_lock_wrapper&& other):
                 base(other.move())
             {}
@@ -963,7 +963,7 @@
             }
         };
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename Mutex>
         void swap(try_lock_wrapper<Mutex>&& lhs,try_lock_wrapper<Mutex>&& rhs)
         {

Modified: trunk/boost/thread/pthread/thread_heap_alloc.hpp
==============================================================================
--- trunk/boost/thread/pthread/thread_heap_alloc.hpp (original)
+++ trunk/boost/thread/pthread/thread_heap_alloc.hpp 2010-02-16 09:57:30 EST (Tue, 16 Feb 2010)
@@ -17,7 +17,7 @@
             return new T();
         }
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename T,typename A1>
         inline T* heap_new(A1&& a1)
         {

Modified: trunk/boost/thread/win32/thread_heap_alloc.hpp
==============================================================================
--- trunk/boost/thread/win32/thread_heap_alloc.hpp (original)
+++ trunk/boost/thread/win32/thread_heap_alloc.hpp 2010-02-16 09:57:30 EST (Tue, 16 Feb 2010)
@@ -87,7 +87,7 @@
             }
         }
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename T,typename A1>
         inline T* heap_new(A1&& a1)
         {

Modified: trunk/libs/thread/test/test_futures.cpp
==============================================================================
--- trunk/libs/thread/test/test_futures.cpp (original)
+++ trunk/libs/thread/test/test_futures.cpp 2010-02-16 09:57:30 EST (Tue, 16 Feb 2010)
@@ -14,7 +14,7 @@
 
 #include <boost/test/unit_test.hpp>
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename T>
     typename boost::remove_reference<T>::type&& cast_to_rval(T&& t)
     {
@@ -41,7 +41,7 @@
     X():
         i(42)
     {}
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     X(X&& other):
         i(other.i)
     {


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