Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77941 - in trunk: boost/thread boost/thread/pthread libs/thread/test libs/thread/test/sync/futures libs/thread/test/sync/futures/packaged_task libs/thread/test/threads/thread/constr
From: vicente.botet_at_[hidden]
Date: 2012-04-12 18:59:26


Author: viboes
Date: 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
New Revision: 77941
URL: http://svn.boost.org/trac/boost/changeset/77941

Log:
Thread: Make use of the new macros to reduce the code duplication-III
Text files modified:
   trunk/boost/thread/future.hpp | 50 -----
   trunk/boost/thread/locks.hpp | 310 +--------------------------------------
   trunk/boost/thread/pthread/condition_variable.hpp | 19 +-
   trunk/boost/thread/pthread/condition_variable_fwd.hpp | 20 +-
   trunk/boost/thread/pthread/mutex.hpp | 41 ++--
   trunk/boost/thread/pthread/once.hpp | 19 +-
   trunk/boost/thread/pthread/recursive_mutex.hpp | 38 ++--
   trunk/boost/thread/pthread/shared_mutex.hpp | 19 +-
   trunk/boost/thread/reverse_lock.hpp | 19 +-
   trunk/boost/thread/shared_lock_guard.hpp | 19 +-
   trunk/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp | 46 -----
   trunk/libs/thread/test/sync/futures/packaged_task/func_ctor_pass.cpp | 58 +-----
   trunk/libs/thread/test/sync/futures/test_allocator.hpp | 10 -
   trunk/libs/thread/test/test_futures.cpp | 40 ----
   trunk/libs/thread/test/threads/thread/constr/FrvalueArgs_pass.cpp | 47 -----
   trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp | 44 -----
   16 files changed, 147 insertions(+), 652 deletions(-)

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -826,19 +826,13 @@
         {
             future_.swap(BOOST_THREAD_RV(other).future_);
         }
- BOOST_THREAD_FUTURE& operator=(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT
- {
- future_=BOOST_THREAD_RV(other).future_;
- BOOST_THREAD_RV(other).future_.reset();
- return *this;
- }
 #else
         BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT:
             future_(BOOST_THREAD_RV(other).future_)
         {
             BOOST_THREAD_RV(other).future_.reset();
         }
-
+#endif
         BOOST_THREAD_FUTURE& operator=(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT
         {
             future_=BOOST_THREAD_RV(other).future_;
@@ -846,7 +840,6 @@
             return *this;
         }
 
-#endif
         shared_future<R> share()
         {
           return shared_future<R>(::boost::move(*this));
@@ -958,9 +951,6 @@
 
         future_ptr future_;
 
-// shared_future(const BOOST_THREAD_FUTURE<R>& other);
-// shared_future& operator=(const BOOST_THREAD_FUTURE<R>& other);
-
         friend class detail::future_waiter;
         friend class promise<R>;
         friend class packaged_task<R>;
@@ -998,18 +988,6 @@
         {
             future_.swap(BOOST_THREAD_RV(other).future_);
         }
- shared_future& operator=(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT
- {
- future_.swap(BOOST_THREAD_RV(other).future_);
- BOOST_THREAD_RV(other).future_.reset();
- return *this;
- }
- shared_future& operator=(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE<R>) other) BOOST_NOEXCEPT
- {
- future_.swap(BOOST_THREAD_RV(other).future_);
- BOOST_THREAD_RV(other).future_.reset();
- return *this;
- }
 #else
         shared_future(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT :
             future_(BOOST_THREAD_RV(other).future_)
@@ -1021,6 +999,7 @@
         {
             BOOST_THREAD_RV(other).future_.reset();
         }
+#endif
         shared_future& operator=(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT
         {
             future_.swap(BOOST_THREAD_RV(other).future_);
@@ -1034,8 +1013,6 @@
             return *this;
         }
 
-#endif
-
         void swap(shared_future& other) BOOST_NOEXCEPT
         {
             future_.swap(other.future_);
@@ -1226,7 +1203,6 @@
             BOOST_THREAD_RV(rhs).future_obtained=false;
             return *this;
         }
-
 #endif
 
         void swap(promise& other)
@@ -1350,30 +1326,14 @@
         }
 
         // Assignment
-#ifndef BOOST_NO_RVALUE_REFERENCES
- promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT :
- future_obtained(BOOST_THREAD_RV(rhs).future_obtained)
- {
- future_.swap(BOOST_THREAD_RV(rhs).future_);
- // we need to release the future as shared_ptr doesn't implements move semantics
- BOOST_THREAD_RV(rhs).future_.reset();
- BOOST_THREAD_RV(rhs).future_obtained=false;
- }
- promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT
- {
- future_.swap(BOOST_THREAD_RV(rhs).future_);
- future_obtained=BOOST_THREAD_RV(rhs).future_obtained;
- BOOST_THREAD_RV(rhs).future_.reset();
- BOOST_THREAD_RV(rhs).future_obtained=false;
- return *this;
- }
-#else
         promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT :
             future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained)
         {
+ // we need to release the future as shared_ptr doesn't implements move semantics
             BOOST_THREAD_RV(rhs).future_.reset();
             BOOST_THREAD_RV(rhs).future_obtained=false;
         }
+
         promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT
         {
             future_=BOOST_THREAD_RV(rhs).future_;
@@ -1383,8 +1343,6 @@
             return *this;
         }
 
-#endif
-
         void swap(promise& other)
         {
             future_.swap(other.future_);

Modified: trunk/boost/thread/locks.hpp
==============================================================================
--- trunk/boost/thread/locks.hpp (original)
+++ trunk/boost/thread/locks.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -285,9 +285,11 @@
         typedef Mutex mutex_type;
         BOOST_THREAD_MOVABLE_ONLY(unique_lock)
 
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
 #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
         unique_lock(const volatile unique_lock&);
 #endif
+#endif
         unique_lock() BOOST_NOEXCEPT :
             m(0),is_locked(false)
         {}
@@ -333,7 +335,6 @@
         }
 #endif
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
         unique_lock(BOOST_THREAD_RV_REF(unique_lock) other) BOOST_NOEXCEPT:
             m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
@@ -342,109 +343,30 @@
         }
         BOOST_THREAD_EXPLICIT_LOCK_CONVERSION unique_lock(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other);
 
-
- unique_lock& operator=(BOOST_THREAD_RV_REF(unique_lock) other) BOOST_NOEXCEPT
+#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+ unique_lock& operator=(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other) BOOST_NOEXCEPT
         {
             unique_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
+#endif
 
-#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
- unique_lock& operator=(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other) BOOST_NOEXCEPT
+ unique_lock& operator=(BOOST_THREAD_RV_REF(unique_lock) other) BOOST_NOEXCEPT
         {
             unique_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
-#endif
-#else // BOOST_NO_RVALUE_REFERENCES
- unique_lock(BOOST_THREAD_RV_REF(unique_lock<Mutex>) other) BOOST_NOEXCEPT:
- m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
- {
- BOOST_THREAD_RV(other).is_locked=false;
- BOOST_THREAD_RV(other).m=0;
- }
- BOOST_THREAD_EXPLICIT_LOCK_CONVERSION unique_lock(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other);
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
 #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
         unique_lock& operator=(unique_lock<Mutex> other)
         {
             swap(other);
             return *this;
         }
-#else // BOOST_WORKAROUND
- unique_lock& operator=(BOOST_THREAD_RV_REF(unique_lock<Mutex>) other) BOOST_NOEXCEPT
- {
- unique_lock temp(other);
- swap(temp);
- return *this;
- }
 #endif // BOOST_WORKAROUND
-#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
- unique_lock& operator=(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other) BOOST_NOEXCEPT
- {
- unique_lock temp(other);
- swap(temp);
- return *this;
- }
-#endif // BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#endif // BOOST_NO_RVALUE_REFERENCES
-
-#ifndef BOOST_NO_RVALUE_REFERENCES
- // Conversion from upgrade locking
- unique_lock(BOOST_THREAD_RV_REF(upgrade_lock<mutex_type>) ul, try_to_lock_t)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(ul).owns_lock()) {
- if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock())
- {
- m = BOOST_THREAD_RV(ul).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(ul).release();
- }
- }
-#ifdef BOOST_THREAD_USES_CHRONO
- template <class Clock, class Duration>
- unique_lock(BOOST_THREAD_RV_REF(upgrade_lock<mutex_type>) ul,
- const chrono::time_point<Clock, Duration>& abs_time)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(ul).owns_lock()) {
- if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_until(abs_time))
- {
- m = BOOST_THREAD_RV(ul).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(ul).release();
- }
- }
-
- template <class Rep, class Period>
- unique_lock(BOOST_THREAD_RV_REF(upgrade_lock<mutex_type>) ul,
- const chrono::duration<Rep, Period>& rel_time)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(ul).owns_lock()) {
- if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_for(rel_time))
- {
- m = BOOST_THREAD_RV(ul).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(ul).release();
- }
- }
 #endif
-#else
 
         // Conversion from upgrade locking
         unique_lock(BOOST_THREAD_RV_REF(upgrade_lock<mutex_type>) ul, try_to_lock_t)
@@ -481,6 +403,7 @@
               m = BOOST_THREAD_RV(ul).release();
             }
         }
+
         template <class Rep, class Period>
         unique_lock(BOOST_THREAD_RV_REF(upgrade_lock<mutex_type>) ul,
                     const chrono::duration<Rep, Period>& rel_time)
@@ -499,10 +422,8 @@
           }
         }
 #endif
-#endif
 
 #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
-#ifndef BOOST_NO_RVALUE_REFERENCES
         // Conversion from shared locking
         unique_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>) sl, try_to_lock_t)
         : m(0),is_locked(false)
@@ -556,63 +477,8 @@
                 m = BOOST_THREAD_RV(sl).release();
               }
         }
-#endif
-#else
- // Conversion from shared locking
- unique_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>) sl, try_to_lock_t)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(sl).owns_lock()) {
- if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock())
- {
- m = BOOST_THREAD_RV(sl).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(sl).release();
- }
- }
-
-#ifdef BOOST_THREAD_USES_CHRONO
- template <class Clock, class Duration>
- unique_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>) sl,
- const chrono::time_point<Clock, Duration>& abs_time)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(sl).owns_lock()) {
- if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_until(abs_time))
- {
- m = BOOST_THREAD_RV(sl).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(sl).release();
- }
- }
- template <class Rep, class Period>
- unique_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>) sl,
- const chrono::duration<Rep, Period>& rel_time)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(sl).owns_lock()) {
- if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_for(rel_time))
- {
- m = BOOST_THREAD_RV(sl).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(sl).release();
- }
- }
-#endif
-#endif
-#endif
+#endif // BOOST_THREAD_USES_CHRONO
+#endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
 
 
         void swap(unique_lock& other) BOOST_NOEXCEPT
@@ -843,7 +709,6 @@
         }
 #endif
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
         shared_lock(BOOST_THREAD_RV_REF(shared_lock<Mutex>) other) BOOST_NOEXCEPT:
             m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
@@ -880,7 +745,6 @@
             swap(temp);
             return *this;
         }
-
 #ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
         shared_lock& operator=(BOOST_THREAD_RV_REF(unique_lock<Mutex>) other)
         {
@@ -896,58 +760,6 @@
             return *this;
         }
 #endif
-#else
- shared_lock(BOOST_THREAD_RV_REF(shared_lock<Mutex>) other) BOOST_NOEXCEPT:
- m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
- {
- BOOST_THREAD_RV(other).is_locked=false;
- BOOST_THREAD_RV(other).m=0;
- }
- BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF(unique_lock<Mutex>) other):
- m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
- {
- if(is_locked)
- {
- m->unlock_and_lock_shared();
- }
- BOOST_THREAD_RV(other).is_locked=false;
- BOOST_THREAD_RV(other).m=0;
- }
-
- BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other):
- m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
- {
- if(is_locked)
- {
- m->unlock_upgrade_and_lock_shared();
- }
- BOOST_THREAD_RV(other).is_locked=false;
- BOOST_THREAD_RV(other).m=0;
- }
-
- shared_lock& operator=(BOOST_THREAD_RV_REF(shared_lock<Mutex>) other) BOOST_NOEXCEPT
- {
- shared_lock temp(other);
- swap(temp);
- return *this;
- }
-
-#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
- shared_lock& operator=(BOOST_THREAD_RV_REF(unique_lock<Mutex>) other)
- {
- shared_lock temp(other);
- swap(temp);
- return *this;
- }
-
- shared_lock& operator=(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other)
- {
- shared_lock temp(other);
- swap(temp);
- return *this;
- }
-#endif // BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#endif // BOOST_NO_RVALUE_REFERENCES
 
         void swap(shared_lock& other) BOOST_NOEXCEPT
         {
@@ -1154,7 +966,6 @@
         }
 #endif
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
         upgrade_lock(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other) BOOST_NOEXCEPT:
             m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
@@ -1188,42 +999,8 @@
             return *this;
         }
 #endif
-#else
- upgrade_lock(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other) BOOST_NOEXCEPT:
- m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
- {
- BOOST_THREAD_RV(other).is_locked=false;
- BOOST_THREAD_RV(other).m=0;
- }
- BOOST_THREAD_EXPLICIT_LOCK_CONVERSION upgrade_lock(BOOST_THREAD_RV_REF(unique_lock<Mutex>) other):
- m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
- {
- if(is_locked)
- {
- m->unlock_and_lock_upgrade();
- }
- BOOST_THREAD_RV(other).is_locked=false;
- BOOST_THREAD_RV(other).m=0;
- }
- upgrade_lock& operator=(BOOST_THREAD_RV_REF(upgrade_lock<Mutex>) other) BOOST_NOEXCEPT
- {
- upgrade_lock temp(other);
- swap(temp);
- return *this;
- }
-
-#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
- upgrade_lock& operator=(BOOST_THREAD_RV_REF(unique_lock<Mutex>) other)
- {
- upgrade_lock temp(other);
- swap(temp);
- return *this;
- }
-#endif
-#endif
 
 #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
-#ifndef BOOST_NO_RVALUE_REFERENCES
         // Conversion from shared locking
         upgrade_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>) sl, try_to_lock_t)
         : m(0),is_locked(false)
@@ -1240,6 +1017,7 @@
             m = BOOST_THREAD_RV(sl).release();
           }
         }
+
 #ifdef BOOST_THREAD_USES_CHRONO
         template <class Clock, class Duration>
             upgrade_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>) sl,
@@ -1277,63 +1055,6 @@
           }
         }
 #endif // BOOST_THREAD_USES_CHRONO
-#else // BOOST_NO_RVALUE_REFERENCES
- // Conversion from shared locking
- upgrade_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>) sl, try_to_lock_t)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(sl).owns_lock()) {
- if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade())
- {
- m = BOOST_THREAD_RV(sl).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(sl).release();
- }
- }
-
-#ifdef BOOST_THREAD_USES_CHRONO
-
- template <class Clock, class Duration>
- upgrade_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>)sl,
- const chrono::time_point<Clock, Duration>& abs_time)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(sl).owns_lock()) {
- if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_until(abs_time))
- {
- m = BOOST_THREAD_RV(sl).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(sl).release();
- }
- }
-
- template <class Rep, class Period>
- upgrade_lock(BOOST_THREAD_RV_REF(shared_lock<mutex_type>)sl,
- const chrono::duration<Rep, Period>& rel_time)
- : m(0),is_locked(false)
- {
- if (BOOST_THREAD_RV(sl).owns_lock()) {
- if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_for(rel_time))
- {
- m = BOOST_THREAD_RV(sl).release();
- is_locked = true;
- }
- }
- else
- {
- m = BOOST_THREAD_RV(sl).release();
- }
- }
-#endif // BOOST_THREAD_USES_CHRONO
-#endif // BOOST_NO_RVALUE_REFERENCES
 #endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
 
         void swap(upgrade_lock& other) BOOST_NOEXCEPT
@@ -1580,13 +1301,6 @@
                 base(::boost::move(other))
             {}
 
- try_lock_wrapper& operator=(BOOST_THREAD_RV_REF(try_lock_wrapper<Mutex>) other)
- {
- try_lock_wrapper temp(::boost::move(other));
- swap(temp);
- return *this;
- }
-
 #else
 #if defined BOOST_THREAD_USES_MOVE
             try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper<Mutex>) other):
@@ -1598,13 +1312,13 @@
                 base(BOOST_THREAD_RV_REF(base)(*other))
             {}
 #endif
+#endif
             try_lock_wrapper& operator=(BOOST_THREAD_RV_REF(try_lock_wrapper<Mutex>) other)
             {
                 try_lock_wrapper temp(other);
                 swap(temp);
                 return *this;
             }
-#endif
             void swap(try_lock_wrapper& other)
             {
                 base::swap(other);

Modified: trunk/boost/thread/pthread/condition_variable.hpp
==============================================================================
--- trunk/boost/thread/pthread/condition_variable.hpp (original)
+++ trunk/boost/thread/pthread/condition_variable.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -111,17 +111,18 @@
         pthread_mutex_t internal_mutex;
         pthread_cond_t cond;
 
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- condition_variable_any(condition_variable_any const&) = delete;
- condition_variable_any& operator=(condition_variable_any const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- condition_variable_any(condition_variable_any&);
- condition_variable_any& operator=(condition_variable_any&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// condition_variable_any(condition_variable_any const&) = delete;
+// condition_variable_any& operator=(condition_variable_any const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// condition_variable_any(condition_variable_any&);
+// condition_variable_any& operator=(condition_variable_any&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
 
     public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable_any)
         condition_variable_any()
         {
             int const res=pthread_mutex_init(&internal_mutex,NULL);

Modified: trunk/boost/thread/pthread/condition_variable_fwd.hpp
==============================================================================
--- trunk/boost/thread/pthread/condition_variable_fwd.hpp (original)
+++ trunk/boost/thread/pthread/condition_variable_fwd.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -30,17 +30,19 @@
         pthread_mutex_t internal_mutex;
         pthread_cond_t cond;
 
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- condition_variable(condition_variable const&) = delete;
- condition_variable& operator=(condition_variable const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- condition_variable(condition_variable const&);
- condition_variable& operator=(condition_variable const&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// condition_variable(condition_variable const&) = delete;
+// condition_variable& operator=(condition_variable const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// condition_variable(condition_variable const&);
+// condition_variable& operator=(condition_variable const&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
 
     public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable)
         condition_variable()
         {
             int const res=pthread_mutex_init(&internal_mutex,NULL);

Modified: trunk/boost/thread/pthread/mutex.hpp
==============================================================================
--- trunk/boost/thread/pthread/mutex.hpp (original)
+++ trunk/boost/thread/pthread/mutex.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -34,18 +34,20 @@
 {
     class mutex
     {
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- mutex(mutex const&) = delete;
- mutex& operator=(mutex const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- mutex(mutex const&);
- mutex& operator=(mutex const&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// mutex(mutex const&) = delete;
+// mutex& operator=(mutex const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// mutex(mutex const&);
+// mutex& operator=(mutex const&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
     private:
         pthread_mutex_t m;
     public:
+ BOOST_THREAD_NO_COPYABLE(mutex)
+
         mutex()
         {
             int const res=pthread_mutex_init(&m,NULL);
@@ -120,16 +122,16 @@
 
     class timed_mutex
     {
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- timed_mutex(timed_mutex const&) = delete;
- timed_mutex& operator=(timed_mutex const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- timed_mutex(timed_mutex const&);
- timed_mutex& operator=(timed_mutex const&);
- public:
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// timed_mutex(timed_mutex const&) = delete;
+// timed_mutex& operator=(timed_mutex const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// timed_mutex(timed_mutex const&);
+// timed_mutex& operator=(timed_mutex const&);
+// public:
+//#endif // BOOST_NO_DELETED_FUNCTIONS
     private:
         pthread_mutex_t m;
 #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK
@@ -137,6 +139,7 @@
         bool is_locked;
 #endif
     public:
+ BOOST_THREAD_NO_COPYABLE(timed_mutex)
         timed_mutex()
         {
             int const res=pthread_mutex_init(&m,NULL);

Modified: trunk/boost/thread/pthread/once.hpp
==============================================================================
--- trunk/boost/thread/pthread/once.hpp (original)
+++ trunk/boost/thread/pthread/once.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -27,18 +27,19 @@
 
   struct once_flag
   {
+ BOOST_THREAD_NO_COPYABLE(once_flag)
       BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT
         : epoch(BOOST_ONCE_INITIAL_FLAG_VALUE)
       {}
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- once_flag(const once_flag&) = delete;
- once_flag& operator=(const once_flag&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- once_flag(once_flag&);
- once_flag& operator=(once_flag&);
- public:
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// once_flag(const once_flag&) = delete;
+// once_flag& operator=(const once_flag&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// once_flag(once_flag&);
+// once_flag& operator=(once_flag&);
+// public:
+//#endif // BOOST_NO_DELETED_FUNCTIONS
   private:
       boost::uintmax_t epoch;
       template<typename Function>

Modified: trunk/boost/thread/pthread/recursive_mutex.hpp
==============================================================================
--- trunk/boost/thread/pthread/recursive_mutex.hpp (original)
+++ trunk/boost/thread/pthread/recursive_mutex.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -40,15 +40,15 @@
 {
     class recursive_mutex
     {
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- recursive_mutex(recursive_mutex const&) = delete;
- recursive_mutex& operator=(recursive_mutex const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- recursive_mutex(recursive_mutex const&);
- recursive_mutex& operator=(recursive_mutex const&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// recursive_mutex(recursive_mutex const&) = delete;
+// recursive_mutex& operator=(recursive_mutex const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// recursive_mutex(recursive_mutex const&);
+// recursive_mutex& operator=(recursive_mutex const&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
     private:
         pthread_mutex_t m;
 #ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
@@ -58,6 +58,7 @@
         unsigned count;
 #endif
     public:
+ BOOST_THREAD_NO_COPYABLE(recursive_mutex)
         recursive_mutex()
         {
 #ifdef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
@@ -182,15 +183,15 @@
 
     class recursive_timed_mutex
     {
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- recursive_timed_mutex(recursive_timed_mutex const&) = delete;
- recursive_timed_mutex& operator=(recursive_timed_mutex const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- recursive_timed_mutex(recursive_timed_mutex const&);
- recursive_timed_mutex& operator=(recursive_timed_mutex const&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// recursive_timed_mutex(recursive_timed_mutex const&) = delete;
+// recursive_timed_mutex& operator=(recursive_timed_mutex const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// recursive_timed_mutex(recursive_timed_mutex const&);
+// recursive_timed_mutex& operator=(recursive_timed_mutex const&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
     private:
         pthread_mutex_t m;
 #ifndef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
@@ -200,6 +201,7 @@
         unsigned count;
 #endif
     public:
+ BOOST_THREAD_NO_COPYABLE(recursive_timed_mutex)
         recursive_timed_mutex()
         {
 #ifdef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK

Modified: trunk/boost/thread/pthread/shared_mutex.hpp
==============================================================================
--- trunk/boost/thread/pthread/shared_mutex.hpp (original)
+++ trunk/boost/thread/pthread/shared_mutex.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -48,16 +48,17 @@
         }
 
 
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- shared_mutex(shared_mutex const&) = delete;
- shared_mutex& operator=(shared_mutex const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- shared_mutex(shared_mutex const&);
- shared_mutex& operator=(shared_mutex const&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// shared_mutex(shared_mutex const&) = delete;
+// shared_mutex& operator=(shared_mutex const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// shared_mutex(shared_mutex const&);
+// shared_mutex& operator=(shared_mutex const&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
     public:
+ BOOST_THREAD_NO_COPYABLE(shared_mutex)
 
         shared_mutex()
         {

Modified: trunk/boost/thread/reverse_lock.hpp
==============================================================================
--- trunk/boost/thread/reverse_lock.hpp (original)
+++ trunk/boost/thread/reverse_lock.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -15,17 +15,18 @@
     class reverse_lock
     {
 
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- reverse_lock(reverse_lock const&) = delete;
- reverse_lock& operator=(reverse_lock const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- reverse_lock(reverse_lock&);
- reverse_lock& operator=(reverse_lock&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// reverse_lock(reverse_lock const&) = delete;
+// reverse_lock& operator=(reverse_lock const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// reverse_lock(reverse_lock&);
+// reverse_lock& operator=(reverse_lock&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
     public:
         typedef typename Lock::mutex_type mutex_type;
+ BOOST_THREAD_NO_COPYABLE(reverse_lock)
 
         explicit reverse_lock(Lock& m_)
         : m(m_), mtx(0)

Modified: trunk/boost/thread/shared_lock_guard.hpp
==============================================================================
--- trunk/boost/thread/shared_lock_guard.hpp (original)
+++ trunk/boost/thread/shared_lock_guard.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -17,17 +17,18 @@
     private:
         SharedMutex& m;
 
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- shared_lock_guard(shared_lock_guard const&) = delete;
- shared_lock_guard& operator=(shared_lock_guard const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
- private:
- shared_lock_guard(shared_lock_guard&);
- shared_lock_guard& operator=(shared_lock_guard&);
-#endif // BOOST_NO_DELETED_FUNCTIONS
+//#ifndef BOOST_NO_DELETED_FUNCTIONS
+// public:
+// shared_lock_guard(shared_lock_guard const&) = delete;
+// shared_lock_guard& operator=(shared_lock_guard const&) = delete;
+//#else // BOOST_NO_DELETED_FUNCTIONS
+// private:
+// shared_lock_guard(shared_lock_guard&);
+// shared_lock_guard& operator=(shared_lock_guard&);
+//#endif // BOOST_NO_DELETED_FUNCTIONS
     public:
         typedef SharedMutex mutex_type;
+ BOOST_THREAD_NO_COPYABLE(shared_lock_guard)
         explicit shared_lock_guard(SharedMutex& m_):
             m(m_)
         {

Modified: trunk/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -41,57 +41,17 @@
   long data_;
 
 public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(A)
   static int n_moves;
   static int n_copies;
 
   explicit A(long i) : data_(i)
   {
   }
-#ifndef BOOST_NO_RVALUE_REFERENCES
- A(A&& a) : data_(a.data_)
+ A(BOOST_THREAD_RV_REF(A) a) : data_(BOOST_THREAD_RV(a).data_)
   {
- ++n_moves; a.data_ = -1;
+ ++n_moves; BOOST_THREAD_RV(a).data_ = -1;
   }
-#else
-
-#if defined BOOST_THREAD_USES_MOVE
- operator ::boost::rv<A>&()
- {
- return *static_cast< ::boost::rv<A>* >(this);
- }
- operator const ::boost::rv<A>&() const
- {
- return *static_cast<const ::boost::rv<A>* >(this);
- }
- ::boost::rv<A>& move()
- {
- return *static_cast< ::boost::rv<A>* >(this);
- }
- const ::boost::rv<A>& move() const
- {
- return *static_cast<const ::boost::rv<A>* >(this);
- }
-
- A(boost::rv<A>& a) : data_(a.data_)
- {
- ++n_moves; a.data_ = -1;
- }
-#else
- operator boost::detail::thread_move_t<A>()
- {
- return boost::detail::thread_move_t<A>(*this);
- }
- boost::detail::thread_move_t<A> move()
- {
- return boost::detail::thread_move_t<A>(*this);
- }
- A(boost::detail::thread_move_t<A> a) : data_(a.data_)
- {
- ++n_moves; a.data_ = -1;
- }
-
-#endif
-#endif
   A(const A& a) : data_(a.data_)
   {
     ++n_copies;

Modified: trunk/libs/thread/test/sync/futures/packaged_task/func_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/func_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/func_ctor_pass.cpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -34,62 +34,32 @@
 
 class A
 {
- long data_;
+ long data_;
 
 public:
- static int n_moves;
- static int n_copies;
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(A)
+ static int n_moves;
+ static int n_copies;
 
- explicit A(long i) : data_(i) {}
-#ifndef BOOST_NO_RVALUE_REFERENCES
- A(A&& a) : data_(a.data_)
+ explicit A(long i) : data_(i)
   {
- ++n_moves; a.data_ = -1;
   }
-#else
-
-#if defined BOOST_THREAD_USES_MOVE
- operator ::boost::rv<A>&()
- {
- return *static_cast< ::boost::rv<A>* >(this);
- }
- operator const ::boost::rv<A>&() const
+ A(BOOST_THREAD_RV_REF(A) a) : data_(BOOST_THREAD_RV(a).data_)
   {
- return *static_cast<const ::boost::rv<A>* >(this);
+ ++n_moves; BOOST_THREAD_RV(a).data_ = -1;
   }
- ::boost::rv<A>& move()
+ A(const A& a) : data_(a.data_)
   {
- return *static_cast< ::boost::rv<A>* >(this);
+ ++n_copies;
   }
- const ::boost::rv<A>& move() const
+ ~A()
   {
- return *static_cast<const ::boost::rv<A>* >(this);
   }
 
- A(boost::rv<A>& a) : data_(a.data_)
- {
- ++n_moves; a.data_ = -1;
- }
-#else
- operator boost::detail::thread_move_t<A>()
- {
- return boost::detail::thread_move_t<A>(*this);
- }
- boost::detail::thread_move_t<A> move()
- {
- return boost::detail::thread_move_t<A>(*this);
- }
- A(boost::detail::thread_move_t<A> a) : data_(a.data_)
- {
- ++n_moves; a.data_ = -1;
- }
-
-#endif
-#endif
- A(const A& a) : data_(a.data_) {++n_copies;}
-
- long operator()() const {return data_;}
- long operator()(long i, long j) const {return data_ + i + j;}
+ long operator()() const
+ { return data_;}
+ long operator()(long i, long j) const
+ { return data_ + i + j;}
 };
 
 int A::n_moves = 0;

Modified: trunk/libs/thread/test/sync/futures/test_allocator.hpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/test_allocator.hpp (original)
+++ trunk/libs/thread/test/sync/futures/test_allocator.hpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -75,16 +75,8 @@
     void construct(pointer p, const T& val)
         {::new(p) T(val);}
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
- void construct(pointer p, T&& val)
+ void construct(pointer p, BOOST_THREAD_RV_REF(T) val)
         {::new(p) T(boost::move(val));}
-#elif defined BOOST_THREAD_USES_MOVE
- void construct(pointer p, ::boost::rv<T>& val)
- {::new(p) T(boost::move(val));}
-#else
- void construct(pointer p, ::boost::detail::thread_move_t<T> val)
- {::new(p) T(boost::move(val));}
-#endif // BOOST_NO_RVALUE_REFERENCES
 
     void destroy(pointer p) {p->~T();}
 

Modified: trunk/libs/thread/test/test_futures.cpp
==============================================================================
--- trunk/libs/thread/test/test_futures.cpp (original)
+++ trunk/libs/thread/test/test_futures.cpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -38,50 +38,18 @@
 
 struct X
 {
-private:
-
- X(X& other);
-
 public:
-
     int i;
 
+ BOOST_THREAD_MOVABLE_ONLY(X)
     X():
         i(42)
     {}
-#ifndef BOOST_NO_RVALUE_REFERENCES
- X(X&& other):
- i(other.i)
- {
- other.i=0;
- }
-#else
-#if defined BOOST_THREAD_USES_MOVE
- X(boost::rv<X>& other):
- i(other.i)
- {
- other.i=0;
- }
- operator ::boost::rv<X>&()
- {
- return *static_cast< ::boost::rv<X>* >(this);
- }
- operator const ::boost::rv<X>&() const
- {
- return *static_cast<const ::boost::rv<X>* >(this);
- }
-#else
- X(boost::detail::thread_move_t<X> other):
- i(other->i)
- {
- other->i=0;
- }
- operator boost::detail::thread_move_t<X>()
+ X(BOOST_THREAD_RV_REF(X) other):
+ i(BOOST_THREAD_RV(other).i)
     {
- return boost::detail::thread_move_t<X>(*this);
+ BOOST_THREAD_RV(other).i=0;
     }
-#endif
-#endif
     ~X()
     {}
 };

Modified: trunk/libs/thread/test/threads/thread/constr/FrvalueArgs_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/constr/FrvalueArgs_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/constr/FrvalueArgs_pass.cpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -25,59 +25,18 @@
 
 class MoveOnly
 {
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- MoveOnly(const MoveOnly&)=delete;
- MoveOnly& operator=(MoveOnly const&);
-#else
- private:
- MoveOnly(MoveOnly&);
- MoveOnly& operator=(MoveOnly&);
- public:
-#endif
+ BOOST_THREAD_MOVABLE_ONLY(MoveOnly)
   MoveOnly()
   {
   }
-#ifndef BOOST_NO_RVALUE_REFERENCES
- MoveOnly(MoveOnly&&)
+ MoveOnly(BOOST_THREAD_RV_REF(MoveOnly))
   {}
-#else
-#if defined BOOST_THREAD_USES_MOVE
- MoveOnly(boost::rv<MoveOnly>&)
- {}
- MoveOnly& operator=(boost::rv<MoveOnly>&)
- {
- return *this;
- }
- operator ::boost::rv<MoveOnly>&()
- {
- return *static_cast< ::boost::rv<MoveOnly>* >(this);
- }
- operator const ::boost::rv<MoveOnly>&() const
- {
- return *static_cast<const ::boost::rv<MoveOnly>* >(this);
- }
- ::boost::rv<MoveOnly>& move()
- {
- return *static_cast< ::boost::rv<MoveOnly>* >(this);
- }
- const ::boost::rv<MoveOnly>& move() const
- {
- return *static_cast<const ::boost::rv<MoveOnly>* >(this);
- }
-#else
-#error
- MoveOnly(detail::thread_move_t<MoveOnly>)
- {}
-#endif
-#endif
 
- void operator()()
+ void operator()(BOOST_THREAD_RV_REF(MoveOnly))
   {
   }
 };
 
-
 int main()
 {
   {

Modified: trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp 2012-04-12 18:59:23 EDT (Thu, 12 Apr 2012)
@@ -25,51 +25,13 @@
 
 class MoveOnly
 {
-#ifndef BOOST_NO_DELETED_FUNCTIONS
- public:
- MoveOnly(const MoveOnly&)=delete;
- MoveOnly& operator=(MoveOnly const&);
-#else
- private:
- MoveOnly(MoveOnly&);
- MoveOnly& operator=(MoveOnly&);
- public:
-#endif
+public:
+ BOOST_THREAD_MOVABLE_ONLY(MoveOnly)
   MoveOnly()
   {
   }
-#ifndef BOOST_NO_RVALUE_REFERENCES
- MoveOnly(MoveOnly&&)
+ MoveOnly(BOOST_THREAD_RV_REF(MoveOnly))
   {}
-#else
-#if defined BOOST_THREAD_USES_MOVE
- MoveOnly(boost::rv<MoveOnly>&)
- {}
- MoveOnly& operator=(boost::rv<MoveOnly>&)
- {
- return *this;
- }
- operator ::boost::rv<MoveOnly>&()
- {
- return *static_cast< ::boost::rv<MoveOnly>* >(this);
- }
- operator const ::boost::rv<MoveOnly>&() const
- {
- return *static_cast<const ::boost::rv<MoveOnly>* >(this);
- }
- ::boost::rv<MoveOnly>& move()
- {
- return *static_cast< ::boost::rv<MoveOnly>* >(this);
- }
- const ::boost::rv<MoveOnly>& move() const
- {
- return *static_cast<const ::boost::rv<MoveOnly>* >(this);
- }
-#else
- MoveOnly(detail::thread_move_t<MoveOnly>)
- {}
-#endif
-#endif
 
   void operator()()
   {


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