Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77379 - trunk/boost/thread/detail
From: vicente.botet_at_[hidden]
Date: 2012-03-18 14:35:21


Author: viboes
Date: 2012-03-18 14:35:20 EDT (Sun, 18 Mar 2012)
New Revision: 77379
URL: http://svn.boost.org/trac/boost/changeset/77379

Log:
Thread: Added thread::move member function when BOOST_THREAD_USES_MOVE is defined (Useful for Sun compiler)
Text files modified:
   trunk/boost/thread/detail/thread.hpp | 23 ++++++++++-------------
   1 files changed, 10 insertions(+), 13 deletions(-)

Modified: trunk/boost/thread/detail/thread.hpp
==============================================================================
--- trunk/boost/thread/detail/thread.hpp (original)
+++ trunk/boost/thread/detail/thread.hpp 2012-03-18 14:35:20 EDT (Sun, 18 Mar 2012)
@@ -144,7 +144,7 @@
     class BOOST_THREAD_DECL thread
     {
     public:
- typedef int boost_move_emulation_t;
+ //typedef int boost_move_emulation_t;
       typedef thread_attributes attributes;
 
 #ifndef BOOST_NO_DELETED_FUNCTIONS
@@ -153,20 +153,8 @@
       thread& operator=(thread const&) = delete;
 #else // BOOST_NO_DELETED_FUNCTIONS
     private:
-// BOOST_MOVABLE_BUT_NOT_COPYABLE(thread)
-
-#if defined BOOST_THREAD_USES_MOVE
- private:
- //thread(thread const&);
- thread(thread &);
- //thread& operator=(thread const&);
- thread& operator=(thread &);
-#else
- private:
       thread(thread&);
       thread& operator=(thread&);
-#endif
- public:
 #endif // BOOST_NO_DELETED_FUNCTIONS
     private:
 
@@ -400,6 +388,15 @@
 #endif
 
 #if defined BOOST_THREAD_USES_MOVE
+ ::boost::rv<thread>& move()
+ {
+ return *static_cast< ::boost::rv<thread>* >(this);
+ }
+ const ::boost::rv<thread>& move() const
+ {
+ return *static_cast<const ::boost::rv<thread>* >(this);
+ }
+
       operator ::boost::rv<thread>&()
       {
         return *static_cast< ::boost::rv<thread>* >(this);


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