Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77918 - in trunk: boost/thread boost/thread/detail libs/thread/doc libs/thread/example libs/thread/test libs/thread/test/sync/futures/future libs/thread/test/sync/futures/packaged_task libs/thread/test/sync/futures/promise libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons libs/thread/test/threads/container libs/thread/test/threads/thread/constr
From: vicente.botet_at_[hidden]
Date: 2012-04-11 13:16:49


Author: viboes
Date: 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
New Revision: 77918
URL: http://svn.boost.org/trac/boost/changeset/77918

Log:
Thread: remove some warnings + rename BOOST_EXPLICIT_MOVE by BOOST_THREAD_MAKE_RV_REF
Added:
   trunk/libs/thread/test/threads/container/
   trunk/libs/thread/test/threads/container/thread_ptr_list_pass.cpp (contents, props changed)
   trunk/libs/thread/test/threads/container/thread_vector_pass.cpp (contents, props changed)
Text files modified:
   trunk/boost/thread/detail/move.hpp | 51 +++++++++++++++++++++++++++++++++++----
   trunk/boost/thread/detail/thread.hpp | 4 ---
   trunk/boost/thread/locks.hpp | 5 ++-
   trunk/boost/thread/reverse_lock.hpp | 2
   trunk/libs/thread/doc/compliance.qbk | 8 +++---
   trunk/libs/thread/doc/emulations.qbk | 2
   trunk/libs/thread/example/condition.cpp | 2
   trunk/libs/thread/example/monitor.cpp | 3 +
   trunk/libs/thread/example/once.cpp | 2
   trunk/libs/thread/example/shared_monitor.cpp | 2
   trunk/libs/thread/example/starvephil.cpp | 4 +-
   trunk/libs/thread/example/thread.cpp | 4 +-
   trunk/libs/thread/example/thread_group.cpp | 4 +-
   trunk/libs/thread/example/tss.cpp | 4 +-
   trunk/libs/thread/example/xtime.cpp | 4 +-
   trunk/libs/thread/test/Jamfile.v2 | 21 ++++++++++-----
   trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp | 12 ++++----
   trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp | 6 ++--
   trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp | 6 ++--
   trunk/libs/thread/test/sync/futures/future/share_pass.cpp | 6 ++--
   trunk/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp | 12 ++++----
   trunk/libs/thread/test/sync/futures/packaged_task/dtor_pass.cpp | 4 +-
   trunk/libs/thread/test/sync/futures/packaged_task/func_ctor_pass.cpp | 12 ++++----
   trunk/libs/thread/test/sync/futures/packaged_task/get_future_pass.cpp | 8 +++---
   trunk/libs/thread/test/sync/futures/packaged_task/member_swap_pass.cpp | 2
   trunk/libs/thread/test/sync/futures/packaged_task/move_assign_pass.cpp | 2
   trunk/libs/thread/test/sync/futures/packaged_task/move_ctor_pass.cpp | 2
   trunk/libs/thread/test/sync/futures/packaged_task/non_member_swap_pass.cpp | 2
   trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp | 6 ++--
   trunk/libs/thread/test/sync/futures/packaged_task/reset_pass.cpp | 2
   trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp | 6 ++--
   trunk/libs/thread/test/sync/futures/promise/default_pass.cpp | 6 ++--
   trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp | 12 ++++----
   trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp | 8 +++---
   trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp | 24 +++++++++---------
   trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp | 24 +++++++++---------
   trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_assign_pass.cpp | 10 +++---
   trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_ctor_pass.cpp | 2
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_assign_pass.cpp | 2
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_pass.cpp | 2
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_pass.cpp | 2
   trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_assign_pass.cpp | 6 ++--
   trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_pass.cpp | 2
   trunk/libs/thread/test/test_4521.cpp | 2
   trunk/libs/thread/test/threads/thread/constr/FrvalueArgs_pass.cpp | 2
   trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp | 4 +-
   trunk/libs/thread/test/threads/thread/constr/move_pass.cpp | 2
   47 files changed, 182 insertions(+), 138 deletions(-)

Modified: trunk/boost/thread/detail/move.hpp
==============================================================================
--- trunk/boost/thread/detail/move.hpp (original)
+++ trunk/boost/thread/detail/move.hpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -11,11 +11,12 @@
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 #endif
 
 #include <boost/move/move.hpp>
 
-#include <boost/config/abi_prefix.hpp>
+//#include <boost/config/abi_prefix.hpp>
 
 namespace boost
 {
@@ -62,15 +63,53 @@
 }
 
 #if ! defined BOOST_NO_RVALUE_REFERENCES
-//&& ! defined BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_EXPLICIT_MOVE(RVALUE) RVALUE
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE
+
+
 #elif ! defined BOOST_NO_RVALUE_REFERENCES && defined BOOST_MSVC
-#define BOOST_EXPLICIT_MOVE(RVALUE) RVALUE
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE
+#else
+
+namespace boost
+{
+namespace detail
+{
+
+#if defined BOOST_THREAD_USES_MOVE
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
 #else
-#define BOOST_EXPLICIT_MOVE(RVALUE) RVALUE.move()
+#define BOOST_THREAD_RV_REF(TYPE) thread_move_t<TYPE>
 #endif
+ template <typename T>
+ BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+ make_rv_ref(T v) BOOST_NOEXCEPT
+ {
+ return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+ }
+// template <typename T>
+// BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+// make_rv_ref(T &v) BOOST_NOEXCEPT
+// {
+// return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+// }
+// template <typename T>
+// const BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+// make_rv_ref(T const&v) BOOST_NOEXCEPT
+// {
+// return (const BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+// }
+}
+}
+
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE.move()
+//#define BOOST_THREAD_MAKE_RV_REF(RVALUE) boost::detail::make_rv_ref(RVALUE)
+#endif
+
+
 
 
-#include <boost/config/abi_suffix.hpp>
+//#include <boost/config/abi_suffix.hpp>
 
 #endif

Modified: trunk/boost/thread/detail/thread.hpp
==============================================================================
--- trunk/boost/thread/detail/thread.hpp (original)
+++ trunk/boost/thread/detail/thread.hpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -11,11 +11,7 @@
 #ifndef BOOST_NO_IOSTREAM
 #include <ostream>
 #endif
-#if defined BOOST_THREAD_USES_MOVE
-#include <boost/move/move.hpp>
-#else
 #include <boost/thread/detail/move.hpp>
-#endif
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/xtime.hpp>
 #include <boost/thread/detail/thread_heap_alloc.hpp>

Modified: trunk/boost/thread/locks.hpp
==============================================================================
--- trunk/boost/thread/locks.hpp (original)
+++ trunk/boost/thread/locks.hpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -383,7 +383,8 @@
         }
         BOOST_THREAD_EXPLICIT_LOCK_CONVERSION unique_lock(boost::rv<upgrade_lock<Mutex> >& other);
 
- operator ::boost::rv<unique_lock<Mutex> >&()
+ //operator boost::rv<boost::unique_lock<boost::mutex> >&
+ operator boost::rv<unique_lock<Mutex> >&()
         {
           return *static_cast< ::boost::rv<unique_lock<Mutex> >* >(this);
         }
@@ -1948,7 +1949,7 @@
         {
             if(source)
             {
- *source=BOOST_EXPLICIT_MOVE(upgrade_lock<Mutex>(::boost::move(exclusive)));
+ *source=BOOST_THREAD_MAKE_RV_REF(upgrade_lock<Mutex>(::boost::move(exclusive)));
             }
         }
 

Modified: trunk/boost/thread/reverse_lock.hpp
==============================================================================
--- trunk/boost/thread/reverse_lock.hpp (original)
+++ trunk/boost/thread/reverse_lock.hpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -40,7 +40,7 @@
         {
           if (mtx) {
             mtx->lock();
- m = BOOST_EXPLICIT_MOVE(Lock(*mtx, adopt_lock));
+ m = BOOST_THREAD_MAKE_RV_REF(Lock(*mtx, adopt_lock));
           }
         }
 

Modified: trunk/libs/thread/doc/compliance.qbk
==============================================================================
--- trunk/libs/thread/doc/compliance.qbk (original)
+++ trunk/libs/thread/doc/compliance.qbk 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -5,12 +5,12 @@
   http://www.boost.org/LICENSE_1_0.txt).
 ]
 
-[section:compliance Compliance and Extension]
+[section:compliance Conformace and Extension]
 
 [section:cpp11 C++11 standard Thread library]
 
 
-[table Compliance C++11 standard
+[table C++11 standard Conformace
     [[Section] [Description] [Status] [Comments] [Ticket]]
     [[30] [Thread support library] [Partial] [-] [-]]
     [[30.1] [General] [-] [-] [-]]
@@ -69,7 +69,7 @@
     [[30.6.6] [Class template future] [Partial] [allocator,unique_future is the closest to future, renamed in V2] [#6228]]
     [[30.6.7] [Class template shared_future] [Partial] [allocator] [#6228]]
     [[30.6.8] [Function template async] [No] [async] [#4710]]
- [[30.6.8] [Class template packaged_task] [Partial] [move] [#yyyy]]
+ [[30.6.9] [Class template packaged_task] [Partial] [move] [#yyyy]]
 ]
 
 [/
@@ -89,7 +89,7 @@
 
 [section:shared Shared Locking extensions]
 
-[table Compliance with Howard's Shared Locking proposal
+[table Howard's Shared Locking Proposal Conformace
     [[Section] [Description] [Status] [Comments]]
     [[X] [Shared Locking] [Yes] [Needs `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION]]
     [[X.1] [Shared Lockables Concepts] [Yes] [ - ]]

Modified: trunk/libs/thread/doc/emulations.qbk
==============================================================================
--- trunk/libs/thread/doc/emulations.qbk (original)
+++ trunk/libs/thread/doc/emulations.qbk 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -66,7 +66,7 @@
 
   thread mkth()
   {
- return BOOST_EXPLICIT_MOVE(thread(f));
+ return BOOST_THREAD_MAKE_RV_REF(thread(f));
   }
 
 See the Boost.Move documentation for a complete description on how to declare new Movable classes and its limitations.

Modified: trunk/libs/thread/example/condition.cpp
==============================================================================
--- trunk/libs/thread/example/condition.cpp (original)
+++ trunk/libs/thread/example/condition.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -1,7 +1,7 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <iostream>

Modified: trunk/libs/thread/example/monitor.cpp
==============================================================================
--- trunk/libs/thread/example/monitor.cpp (original)
+++ trunk/libs/thread/example/monitor.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -1,7 +1,7 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <vector>
@@ -89,6 +89,7 @@
 template <typename M>
 void do_test(M* dummy=0)
 {
+ (void)dummy;
     typedef buffer_t<M> buffer_type;
     buffer_type::get_buffer();
     boost::thread thrd1(&buffer_type::do_receiver_thread);

Modified: trunk/libs/thread/example/once.cpp
==============================================================================
--- trunk/libs/thread/example/once.cpp (original)
+++ trunk/libs/thread/example/once.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -28,7 +28,7 @@
     boost::call_once(&init, once);
 }
 
-int main(int argc, char* argv[])
+int main()
 {
     boost::thread_group threads;
     for (int i=0; i<5; ++i)

Modified: trunk/libs/thread/example/shared_monitor.cpp
==============================================================================
--- trunk/libs/thread/example/shared_monitor.cpp (original)
+++ trunk/libs/thread/example/shared_monitor.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -128,7 +128,7 @@
     v.push_back(&thr2);
     boost::thread thr3(test_w);
     v.push_back(&thr3);
- for (int i = 0; i < v.size(); ++i)
+ for (std::size_t i = 0; i < v.size(); ++i)
         v[i]->join();
     Clock::time_point t1 = Clock::now();
     std::cout << sec(t1-t0) << '\n';

Modified: trunk/libs/thread/example/starvephil.cpp
==============================================================================
--- trunk/libs/thread/example/starvephil.cpp (original)
+++ trunk/libs/thread/example/starvephil.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -1,7 +1,7 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/mutex.hpp>
@@ -164,7 +164,7 @@
     void* _param;
 };
 
-int main(int argc, char* argv[])
+int main()
 {
     boost::thread thrd_chef(&chef);
     phil p[] = { phil(0), phil(1), phil(2), phil(3), phil(4) };

Modified: trunk/libs/thread/example/thread.cpp
==============================================================================
--- trunk/libs/thread/example/thread.cpp (original)
+++ trunk/libs/thread/example/thread.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -1,7 +1,7 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/thread.hpp>
@@ -25,7 +25,7 @@
     int m_secs;
 };
 
-int main(int argc, char* argv[])
+int main()
 {
     int secs = 5;
     std::cout << "setting alarm for 5 seconds..." << std::endl;

Modified: trunk/libs/thread/example/thread_group.cpp
==============================================================================
--- trunk/libs/thread/example/thread_group.cpp (original)
+++ trunk/libs/thread/example/thread_group.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -1,7 +1,7 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/thread.hpp>
@@ -16,7 +16,7 @@
     std::cout << "count = " << ++count << std::endl;
 }
 
-int main(int argc, char* argv[])
+int main()
 {
     boost::thread_group threads;
     for (int i = 0; i < 10; ++i)

Modified: trunk/libs/thread/example/tss.cpp
==============================================================================
--- trunk/libs/thread/example/tss.cpp (original)
+++ trunk/libs/thread/example/tss.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -1,7 +1,7 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/thread.hpp>
@@ -27,7 +27,7 @@
     }
 }
 
-int main(int argc, char* argv[])
+int main()
 {
     boost::thread_group threads;
     for (int i=0; i<5; ++i)

Modified: trunk/libs/thread/example/xtime.cpp
==============================================================================
--- trunk/libs/thread/example/xtime.cpp (original)
+++ trunk/libs/thread/example/xtime.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -1,13 +1,13 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
 
-int main(int argc, char* argv[])
+int main()
 {
     boost::xtime xt;
     boost::xtime_get(&xt, boost::TIME_UTC);

Modified: trunk/libs/thread/test/Jamfile.v2
==============================================================================
--- trunk/libs/thread/test/Jamfile.v2 (original)
+++ trunk/libs/thread/test/Jamfile.v2 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -33,7 +33,7 @@
         <toolset>darwin:<cxxflags>-Wextra
         <toolset>darwin:<cxxflags>-pedantic
         <toolset>darwin:<cxxflags>-Wno-long-long
- #<toolset>darwin:<cxxflags>-ansi
+ #<toolset>darwin:<cxxflags>-ansi # doesn't work for 4.1.2
         <toolset>darwin:<cxxflags>-fpermissive
 
         #<toolset>pathscale:<cxxflags>-Wextra
@@ -44,7 +44,7 @@
         <toolset>clang:<cxxflags>-pedantic
         <toolset>clang:<cxxflags>-Wno-long-long
         <toolset>clang:<cxxflags>-ansi
- #<toolset>clang:<cxxflags>-fpermissive
+ #<toolset>clang:<cxxflags>-fpermissive # doesn't work
 
         <toolset>gcc-mingw-4.4.0:<cxxflags>-fdiagnostics-show-option
         <toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
@@ -53,8 +53,10 @@
         <toolset>gcc-mingw-4.7.0:<cxxflags>-fdiagnostics-show-option
         <toolset>gcc-mingw-4.8.0:<cxxflags>-fdiagnostics-show-option
 
- #<toolset>darwin-4.6.2:<cxxflags>-Wno-delete-non-virtual-dtor
- #<toolset>darwin-4.7.0:<cxxflags>-Wno-delete-non-virtual-dtor
+ <toolset>darwin-4.6.2:<cxxflags>-ansi
+ #<toolset>darwin-4.6.2:<cxxflags>-Wno-delete-non-virtual-dtor # doesn't work
+ <toolset>darwin-4.7.0:<cxxflags>-ansi
+ <toolset>darwin-4.7.0:<cxxflags>-Wno-delete-non-virtual-dtor
 
         #<toolset>clang-2.8:<cxxflags>-Wno-delete-non-virtual-dtor
         #<toolset>clang-2.8:<cxxflags>-Wno-unused-function
@@ -463,11 +465,16 @@
           [ thread-run2 ./threads/thread/members/swap_pass.cpp : thread__swap_p ]
           [ thread-run2 ./threads/thread/non_members/swap_pass.cpp : swap_threads_p ]
           [ thread-run2 ./threads/thread/static/hardware_concurrency_pass.cpp : thread__hardware_concurrency_p ]
- #[ thread-run2 ./threads/container/thread_vector_pass.cpp : thread_vector_p ]
- #[ thread-run2 ./threads/container/thread_ptr_list_pass.cpp : thread_ptr_list_p ]
     ;
 
- #explicit examples ;
+ #explicit ts_container ;
+ test-suite ts_container
+ :
+ [ thread-run2 ./threads/container/thread_vector_pass.cpp : container__thread_vector_p ]
+ [ thread-run2 ./threads/container/thread_ptr_list_pass.cpp : container__thread_ptr_list_p ]
+ ;
+
+ explicit examples ;
     test-suite ts_examples
     :
           [ thread-run ../example/monitor.cpp ]

Modified: trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -37,7 +37,7 @@
       {
           boost::promise<T> p(boost::allocator_arg, test_allocator<T>());
           BOOST_TEST(test_alloc_base::count == 1);
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(test_alloc_base::count == 1);
           BOOST_TEST(f.valid());
       }
@@ -51,7 +51,7 @@
       {
           boost::promise<T> p(boost::allocator_arg, test_allocator<int>());
           BOOST_TEST(test_alloc_base::count == 1);
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(test_alloc_base::count == 1);
           BOOST_TEST(f.valid());
       }
@@ -65,7 +65,7 @@
       {
           boost::promise<T> p(boost::allocator_arg, test_allocator<T>());
           BOOST_TEST(test_alloc_base::count == 1);
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(test_alloc_base::count == 1);
           BOOST_TEST(f.valid());
       }
@@ -79,7 +79,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(f.valid());
       }
       BOOST_TEST(f.valid());
@@ -89,7 +89,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(f.valid());
       }
       BOOST_TEST(f.valid());
@@ -99,7 +99,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(f.valid());
       }
       BOOST_TEST(f.valid());

Modified: trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -31,7 +31,7 @@
   {
       typedef int T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::future<T> f;
       f = boost::move(f0);
       BOOST_TEST(!f0.valid());
@@ -48,7 +48,7 @@
   {
       typedef int& T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::future<T> f;
       f = boost::move(f0);
       BOOST_TEST(!f0.valid());
@@ -65,7 +65,7 @@
   {
       typedef void T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::future<T> f;
       f = boost::move(f0);
       BOOST_TEST(!f0.valid());

Modified: trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -30,7 +30,7 @@
   {
       typedef int T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::future<T> f = boost::move(f0);
       BOOST_TEST(!f0.valid());
       BOOST_TEST(f.valid());
@@ -45,7 +45,7 @@
   {
       typedef int& T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::future<T> f = boost::move(f0);
       BOOST_TEST(!f0.valid());
       BOOST_TEST(f.valid());
@@ -60,7 +60,7 @@
   {
       typedef void T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::future<T> f = boost::move(f0);
       BOOST_TEST(!f0.valid());
       BOOST_TEST(f.valid());

Modified: trunk/libs/thread/test/sync/futures/future/share_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/share_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/share_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -29,7 +29,7 @@
   {
       typedef int T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::shared_future<T> sf = f0.share();
       boost::shared_future<T> f = sf;
       BOOST_TEST(!f0.valid());
@@ -46,7 +46,7 @@
   {
       typedef int& T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::shared_future<T> sf = f0.share();
       boost::shared_future<T> f = sf;
       BOOST_TEST(!f0.valid());
@@ -63,7 +63,7 @@
   {
       typedef void T;
       boost::promise<T> p;
- boost::future<T> f0 = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<T> f0 = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::shared_future<T> sf = f0.share();
       boost::shared_future<T> f = sf;
       BOOST_TEST(!f0.valid());

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-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -113,10 +113,10 @@
 {
   {
     boost::packaged_task<double> p(boost::allocator_arg,
- test_allocator<A>(), BOOST_EXPLICIT_MOVE(A(5)));
+ test_allocator<A>(), BOOST_THREAD_MAKE_RV_REF(A(5)));
     BOOST_TEST(test_alloc_base::count > 0);
     BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);
@@ -132,7 +132,7 @@
         test_allocator<A>(), a);
     BOOST_TEST(test_alloc_base::count > 0);
     BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);
@@ -148,7 +148,7 @@
         test_allocator<A>(), a);
     BOOST_TEST(test_alloc_base::count > 0);
     BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);
@@ -161,7 +161,7 @@
         test_allocator<A>(), fct);
     BOOST_TEST(test_alloc_base::count > 0);
     BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);
@@ -171,7 +171,7 @@
         test_allocator<A>(), &lfct);
     BOOST_TEST(test_alloc_base::count > 0);
     BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);

Modified: trunk/libs/thread/test/sync/futures/packaged_task/dtor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/dtor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/dtor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -50,7 +50,7 @@
 {
   {
       boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::thread(func, boost::move(p)).detach();
       try
       {
@@ -64,7 +64,7 @@
   }
   {
       boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       boost::thread(func2, boost::move(p)).detach();
       BOOST_TEST(f.get() == 5.0);
   }

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-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -99,9 +99,9 @@
 int main()
 {
   {
- boost::packaged_task<double> p(BOOST_EXPLICIT_MOVE(A(5)));
+ boost::packaged_task<double> p(BOOST_THREAD_MAKE_RV_REF(A(5)));
       BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       //p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);
@@ -114,7 +114,7 @@
       A a(5);
       boost::packaged_task<double> p(a);
       BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       //p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);
@@ -128,7 +128,7 @@
       const A a(5);
       boost::packaged_task<double> p(a);
       BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       //p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);
@@ -138,7 +138,7 @@
   {
       boost::packaged_task<double> p(fct);
       BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       //p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);
@@ -146,7 +146,7 @@
   {
       boost::packaged_task<double> p(&lfct);
       BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       //p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);

Modified: trunk/libs/thread/test/sync/futures/packaged_task/get_future_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/get_future_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/get_future_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -39,17 +39,17 @@
 {
   {
       boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       //p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);
   }
   {
       boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       try
       {
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(false);
       }
       catch (const boost::future_error& e)
@@ -61,7 +61,7 @@
       boost::packaged_task<double> p;
       try
       {
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(false);
       }
       catch (const boost::future_error& e)

Modified: trunk/libs/thread/test/sync/futures/packaged_task/member_swap_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/member_swap_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/member_swap_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -51,7 +51,7 @@
     p.swap(p0);
     BOOST_TEST(!p0.valid());
     BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);

Modified: trunk/libs/thread/test/sync/futures/packaged_task/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/move_assign_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -44,7 +44,7 @@
       p = boost::move(p0);
       BOOST_TEST(!p0.valid());
       BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       // p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);

Modified: trunk/libs/thread/test/sync/futures/packaged_task/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/move_ctor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -42,7 +42,7 @@
     boost::packaged_task<double> p = boost::move(p0);
     BOOST_TEST(!p0.valid());
     BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);

Modified: trunk/libs/thread/test/sync/futures/packaged_task/non_member_swap_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/non_member_swap_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/non_member_swap_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -42,7 +42,7 @@
       p.swap(p0);
       BOOST_TEST(!p0.valid());
       BOOST_TEST(p.valid());
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       //p(3, 'a');
       p();
       BOOST_TEST(f.get() == 5.0);

Modified: trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -89,13 +89,13 @@
 {
   {
     boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     boost::thread(func0, boost::move(p)).detach();
     BOOST_TEST(f.get() == 5.0);
   }
   {
     boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     boost::thread(func1, boost::move(p)).detach();
     try
     {
@@ -110,7 +110,7 @@
   }
   {
     boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     boost::thread t(func2, boost::move(p));
     BOOST_TEST(f.get() == 5.0);
     t.join();

Modified: trunk/libs/thread/test/sync/futures/packaged_task/reset_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/reset_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/reset_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -47,7 +47,7 @@
 {
   {
     boost::packaged_task<double> p(A(5));
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     //p(3, 'a');
     p();
     BOOST_TEST(f.get() == 5.0);

Modified: trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -31,7 +31,7 @@
   {
       boost::promise<int> p(boost::allocator_arg, test_allocator<int>());
       BOOST_TEST(test_alloc_base::count == 1);
- boost::future<int> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       BOOST_TEST(test_alloc_base::count == 1);
       BOOST_TEST(f.valid());
   }
@@ -39,7 +39,7 @@
   {
       boost::promise<int&> p(boost::allocator_arg, test_allocator<int>());
       BOOST_TEST(test_alloc_base::count == 1);
- boost::future<int&> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int&> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       BOOST_TEST(test_alloc_base::count == 1);
       BOOST_TEST(f.valid());
   }
@@ -47,7 +47,7 @@
   {
       boost::promise<void> p(boost::allocator_arg, test_allocator<void>());
       BOOST_TEST(test_alloc_base::count == 1);
- boost::future<void> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<void> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       BOOST_TEST(test_alloc_base::count == 1);
       BOOST_TEST(f.valid());
   }

Modified: trunk/libs/thread/test/sync/futures/promise/default_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/default_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/default_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -28,18 +28,18 @@
 
   {
       boost::promise<int> p;
- boost::future<int> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       BOOST_TEST(f.valid());
   }
   {
       boost::promise<int&> p;
- boost::future<int&> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int&> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       BOOST_TEST(f.valid());
   }
   {
       boost::promise<void> p;
       std::cout << __LINE__ << std::endl;
- boost::future<void> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<void> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       std::cout << __LINE__ << std::endl;
       BOOST_TEST(f.valid());
   }

Modified: trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -30,7 +30,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           p.set_value(3);
       }
       BOOST_TEST(f.get() == 3);
@@ -40,7 +40,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       }
       try
       {
@@ -59,7 +59,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           p.set_value(i);
       }
       BOOST_TEST(&f.get() == &i);
@@ -69,7 +69,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       }
       try
       {
@@ -87,7 +87,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           p.set_value();
       }
       f.get();
@@ -98,7 +98,7 @@
       boost::future<T> f;
       {
           boost::promise<T> p;
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       }
       try
       {

Modified: trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -27,16 +27,16 @@
 {
   {
       boost::promise<double> p;
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       p.set_value(105.5);
       BOOST_TEST(f.get() == 105.5);
   }
   {
       boost::promise<double> p;
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
       try
       {
- f = BOOST_EXPLICIT_MOVE(p.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(false);
       }
       catch (const boost::future_error& e)
@@ -49,7 +49,7 @@
       boost::promise<double> p0 = boost::move(p);
       try
       {
- boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<double> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
           BOOST_TEST(false);
       }
       catch (const boost::future_error& e)

Modified: trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -39,12 +39,12 @@
     BOOST_TEST(test_alloc_base::count == 2);
     p = boost::move(p0);
     BOOST_TEST(test_alloc_base::count == 1);
- boost::future<int> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(test_alloc_base::count == 1);
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -61,12 +61,12 @@
     BOOST_TEST(test_alloc_base::count == 2);
     p = boost::move(p0);
     BOOST_TEST(test_alloc_base::count == 1);
- boost::future<int&> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int&> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(test_alloc_base::count == 1);
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -82,12 +82,12 @@
     BOOST_TEST(test_alloc_base::count == 2);
     p = boost::move(p0);
     BOOST_TEST(test_alloc_base::count == 1);
- boost::future<void> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<void> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(test_alloc_base::count == 1);
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -103,11 +103,11 @@
     boost::promise<int> p0;
     boost::promise<int> p;
     p = boost::move(p0);
- boost::future<int> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -120,11 +120,11 @@
     boost::promise<int&> p0;
     boost::promise<int&> p;
     p = boost::move(p0);
- boost::future<int&> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int&> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -136,11 +136,11 @@
     boost::promise<void> p0;
     boost::promise<void> p;
     p = boost::move(p0);
- boost::future<void> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<void> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)

Modified: trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -37,14 +37,14 @@
     boost::promise<int> p(boost::move(p0));
     BOOST_TEST(test_alloc_base::count == 1);
     std::cout << __LINE__ << std::endl;
- boost::future<int> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     std::cout << __LINE__ << std::endl;
     BOOST_TEST(test_alloc_base::count == 1);
     BOOST_TEST(f.valid());
     std::cout << __LINE__ << std::endl;
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -60,12 +60,12 @@
     boost::promise<int&> p0(boost::allocator_arg, test_allocator<int>());
     boost::promise<int&> p(boost::move(p0));
     BOOST_TEST(test_alloc_base::count == 1);
- boost::future<int&> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int&> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(test_alloc_base::count == 1);
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -79,12 +79,12 @@
     boost::promise<void> p0(boost::allocator_arg, test_allocator<void>());
     boost::promise<void> p(boost::move(p0));
     BOOST_TEST(test_alloc_base::count == 1);
- boost::future<void> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<void> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(test_alloc_base::count == 1);
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -99,13 +99,13 @@
     boost::promise<int> p0;
     boost::promise<int> p(boost::move(p0));
     std::cout << __LINE__ << std::endl;
- boost::future<int> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     std::cout << __LINE__ << std::endl;
     BOOST_TEST(f.valid());
     std::cout << __LINE__ << std::endl;
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -118,11 +118,11 @@
   {
     boost::promise<int&> p0;
     boost::promise<int&> p(boost::move(p0));
- boost::future<int&> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<int&> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)
@@ -133,11 +133,11 @@
   {
     boost::promise<void> p0;
     boost::promise<void> p(boost::move(p0));
- boost::future<void> f = BOOST_EXPLICIT_MOVE(p.get_future());
+ boost::future<void> f = BOOST_THREAD_MAKE_RV_REF(p.get_future());
     BOOST_TEST(f.valid());
     try
     {
- f = BOOST_EXPLICIT_MOVE(p0.get_future());
+ f = BOOST_THREAD_MAKE_RV_REF(p0.get_future());
       BOOST_TEST(false);
     }
     catch (const boost::future_error& e)

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_assign_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -40,14 +40,14 @@
   {
 
     boost::shared_lock<boost::shared_mutex> lk1;
- lk1 = BOOST_EXPLICIT_MOVE(boost::shared_lock<boost::shared_mutex>(m0));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::shared_lock<boost::shared_mutex>(m0));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
   }
   {
     boost::unique_lock<boost::shared_mutex> lk0(m0);
     boost::shared_lock<boost::shared_mutex> lk1(m1);
- lk1 = BOOST_EXPLICIT_MOVE(boost::shared_lock<boost::shared_mutex>(boost::move(lk0)));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::shared_lock<boost::shared_mutex>(boost::move(lk0)));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
     BOOST_TEST(lk0.mutex() == 0);
@@ -56,14 +56,14 @@
   {
 
     boost::shared_lock<boost::shared_mutex> lk1;
- lk1 = BOOST_EXPLICIT_MOVE(boost::shared_lock<boost::shared_mutex>(boost::unique_lock<boost::shared_mutex>(m0)));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::shared_lock<boost::shared_mutex>(boost::unique_lock<boost::shared_mutex>(m0)));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
   }
   {
     boost::upgrade_lock<boost::shared_mutex> lk0(m0);
     boost::shared_lock<boost::shared_mutex> lk1(m1);
- lk1 = BOOST_EXPLICIT_MOVE(boost::shared_lock<boost::shared_mutex>(boost::move(lk0)));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::shared_lock<boost::shared_mutex>(boost::move(lk0)));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
     BOOST_TEST(lk0.mutex() == 0);
@@ -72,7 +72,7 @@
   {
 
     boost::shared_lock<boost::shared_mutex> lk1;
- lk1 = BOOST_EXPLICIT_MOVE(boost::shared_lock<boost::shared_mutex>(boost::upgrade_lock<boost::shared_mutex>(m0)));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::shared_lock<boost::shared_mutex>(boost::upgrade_lock<boost::shared_mutex>(m0)));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
   }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/move_ctor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -36,7 +36,7 @@
   BOOST_TEST(lk0.owns_lock() == false);
   }
   {
- boost::shared_lock<boost::shared_mutex> lk( (BOOST_EXPLICIT_MOVE(boost::shared_lock<boost::shared_mutex>(m))));
+ boost::shared_lock<boost::shared_mutex> lk( (BOOST_THREAD_MAKE_RV_REF(boost::shared_lock<boost::shared_mutex>(m))));
   BOOST_TEST(lk.mutex() == &m);
   BOOST_TEST(lk.owns_lock() == true);
   }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_assign_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -42,7 +42,7 @@
   {
 
     boost::unique_lock<boost::mutex> lk1;
- lk1 = BOOST_EXPLICIT_MOVE(boost::unique_lock<boost::mutex>(m0));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::unique_lock<boost::mutex>(m0));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
   }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -36,7 +36,7 @@
   BOOST_TEST(lk0.owns_lock() == false);
   }
   {
- boost::unique_lock<boost::mutex> lk( (BOOST_EXPLICIT_MOVE(boost::unique_lock<boost::mutex>(m))));
+ boost::unique_lock<boost::mutex> lk( (BOOST_THREAD_MAKE_RV_REF(boost::unique_lock<boost::mutex>(m))));
   BOOST_TEST(lk.mutex() == &m);
   BOOST_TEST(lk.owns_lock() == true);
   }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -36,7 +36,7 @@
   BOOST_TEST(lk0.owns_lock() == false);
   }
   {
- boost::unique_lock<boost::upgrade_mutex> lk( (BOOST_EXPLICIT_MOVE(boost::upgrade_lock<boost::upgrade_mutex>(m))));
+ boost::unique_lock<boost::upgrade_mutex> lk( (BOOST_THREAD_MAKE_RV_REF(boost::upgrade_lock<boost::upgrade_mutex>(m))));
   BOOST_TEST(lk.mutex() == &m);
   BOOST_TEST(lk.owns_lock() == true);
   }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_assign_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -40,14 +40,14 @@
   {
 
     boost::upgrade_lock<boost::shared_mutex> lk1;
- lk1 = BOOST_EXPLICIT_MOVE(boost::upgrade_lock<boost::shared_mutex>(m0));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::upgrade_lock<boost::shared_mutex>(m0));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
   }
   {
     boost::unique_lock<boost::shared_mutex> lk0(m0);
     boost::upgrade_lock<boost::shared_mutex> lk1(m1);
- lk1 = BOOST_EXPLICIT_MOVE(boost::upgrade_lock<boost::shared_mutex>(boost::move(lk0)));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::upgrade_lock<boost::shared_mutex>(boost::move(lk0)));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
     BOOST_TEST(lk0.mutex() == 0);
@@ -56,7 +56,7 @@
   {
 
     boost::upgrade_lock<boost::shared_mutex> lk1;
- lk1 = BOOST_EXPLICIT_MOVE(boost::upgrade_lock<boost::shared_mutex>(boost::unique_lock<boost::shared_mutex>(m0)));
+ lk1 = BOOST_THREAD_MAKE_RV_REF(boost::upgrade_lock<boost::shared_mutex>(boost::unique_lock<boost::shared_mutex>(m0)));
     BOOST_TEST(lk1.mutex() == &m0);
     BOOST_TEST(lk1.owns_lock() == true);
   }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -36,7 +36,7 @@
   BOOST_TEST(lk0.owns_lock() == false);
   }
   {
- boost::upgrade_lock<boost::shared_mutex> lk( (BOOST_EXPLICIT_MOVE(boost::upgrade_lock<boost::shared_mutex>(m))));
+ boost::upgrade_lock<boost::shared_mutex> lk( (BOOST_THREAD_MAKE_RV_REF(boost::upgrade_lock<boost::shared_mutex>(m))));
   BOOST_TEST(lk.mutex() == &m);
   BOOST_TEST(lk.owns_lock() == true);
   }

Modified: trunk/libs/thread/test/test_4521.cpp
==============================================================================
--- trunk/libs/thread/test/test_4521.cpp (original)
+++ trunk/libs/thread/test/test_4521.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -7,7 +7,7 @@
 
 int main() {
 boost::packaged_task<int> pt(calculate_the_answer_to_life_the_universe_and_everything);
-boost::unique_future<int> fi=BOOST_EXPLICIT_MOVE(pt.get_future());
+boost::unique_future<int> fi=BOOST_THREAD_MAKE_RV_REF(pt.get_future());
 
 boost::thread task(boost::move(pt)); // launch task on a thread
 

Added: trunk/libs/thread/test/threads/container/thread_ptr_list_pass.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/thread/test/threads/container/thread_ptr_list_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -0,0 +1,99 @@
+// Copyright (C) 2011 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/config.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/container/list.hpp>
+//#include <boost/interprocess/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr.hpp>
+#include <iostream>
+#include <boost/detail/lightweight_test.hpp>
+
+
+int count = 0;
+boost::mutex mutex;
+
+namespace {
+
+
+template <typename TC>
+void join_all(TC & tc)
+{
+ for (typename TC::iterator it = tc.begin(); it != tc.end(); ++it)
+ {
+ (*it)->join();
+ }
+}
+
+
+void increment_count()
+{
+ boost::mutex::scoped_lock lock(mutex);
+ std::cout << "count = " << ++count << std::endl;
+}
+
+template <class T>
+struct default_delete
+{
+ typedef T* pointer;
+
+ BOOST_CONSTEXPR default_delete() BOOST_NOEXCEPT {} //= default;
+ template <class U>
+ default_delete(const default_delete<U>&) BOOST_NOEXCEPT
+ {}
+ void operator()(T* ptr) const
+ {
+ delete ptr;
+ }
+};
+
+}
+int main()
+{
+ {
+ typedef boost::shared_ptr<boost::thread > thread_ptr;
+ //typedef boost::interprocess::shared_ptr<boost::thread, std::allocator<boost::thread>, default_delete<boost::thread> > thread_ptr;
+ typedef boost::container::list<thread_ptr > thread_ptr_list;
+ thread_ptr_list threads;
+ for (int i = 0; i < 10; ++i)
+ {
+ //threads.push_back(BOOST_THREAD_MAKE_RV_REF(thread_ptr(new boost::thread(&increment_count))));
+ threads.push_back(thread_ptr(new boost::thread(&increment_count)));
+ }
+ BOOST_TEST(threads.size()==10);
+ //join_all(threads);
+ for (thread_ptr_list::iterator it = threads.begin(); it != threads.end(); ++it)
+ {
+ (*it)->join();
+ }
+ }
+ count = 0;
+ {
+ typedef boost::shared_ptr<boost::thread > thread_ptr;
+ //typedef boost::interprocess::shared_ptr<boost::thread, std::allocator<boost::thread>, default_delete<boost::thread> > thread_ptr;
+ typedef boost::container::list<thread_ptr > thread_ptr_list;
+ thread_ptr_list threads;
+ for (int i = 0; i < 10; ++i)
+ {
+ //threads.push_back(BOOST_THREAD_MAKE_RV_REF(thread_ptr(new boost::thread(&increment_count))));
+ threads.push_back(thread_ptr(new boost::thread(&increment_count)));
+ }
+ BOOST_TEST(threads.size()==10);
+ thread_ptr sth(new boost::thread(&increment_count));
+ threads.push_back(sth);
+ BOOST_TEST(threads.size()==11);
+ threads.remove(sth);
+ BOOST_TEST(threads.size()==10);
+ sth->join();
+ //join_all(threads);
+ for (thread_ptr_list::iterator it = threads.begin(); it != threads.end(); ++it)
+ {
+ (*it)->join();
+ }
+ }
+
+ return boost::report_errors();
+}

Added: trunk/libs/thread/test/threads/container/thread_vector_pass.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/thread/test/threads/container/thread_vector_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -0,0 +1,86 @@
+// Copyright (C) 2011 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/container/vector.hpp>
+#include <iostream>
+#include <boost/detail/lightweight_test.hpp>
+
+int count = 0;
+boost::mutex mutex;
+
+namespace
+{
+template <typename TC>
+void join_all(TC & tc)
+{
+ for (typename TC::iterator it = tc.begin(); it != tc.end(); ++it)
+ {
+ it->join();
+ }
+}
+
+template <typename TC>
+void interrupt_all(TC & tc)
+{
+ for (typename TC::iterator it = tc.begin(); it != tc.end(); ++it)
+ {
+ it->interrupt();
+ }
+}
+}
+
+void increment_count()
+{
+ boost::mutex::scoped_lock lock(mutex);
+ std::cout << "count = " << ++count << std::endl;
+}
+
+int main()
+{
+ typedef boost::container::vector<boost::thread> thread_vector;
+ {
+ thread_vector threads;
+ threads.reserve(10);
+ for (int i = 0; i < 10; ++i)
+ {
+ boost::thread th(&increment_count);
+ threads.push_back(boost::move(th));
+ }
+ join_all(threads);
+ }
+ count = 0;
+ {
+ thread_vector threads;
+ threads.reserve(10);
+ for (int i = 0; i < 10; ++i)
+ {
+ threads.push_back(BOOST_THREAD_MAKE_RV_REF(boost::thread(&increment_count)));
+ }
+ join_all(threads);
+ }
+ count = 0;
+ {
+ thread_vector threads;
+ threads.reserve(10);
+ for (int i = 0; i < 10; ++i)
+ {
+ threads.emplace_back(&increment_count);
+ }
+ join_all(threads);
+ }
+ count = 0;
+ {
+ thread_vector threads;
+ threads.reserve(10);
+ for (int i = 0; i < 10; ++i)
+ {
+ threads.emplace_back(&increment_count);
+ }
+ interrupt_all(threads);
+ }
+ return boost::report_errors();
+}

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-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -81,7 +81,7 @@
 int main()
 {
   {
- boost::thread t = boost::thread( BOOST_EXPLICIT_MOVE(MoveOnly()), BOOST_EXPLICIT_MOVE(MoveOnly()) );
+ boost::thread t = boost::thread( BOOST_THREAD_MAKE_RV_REF(MoveOnly()), BOOST_THREAD_MAKE_RV_REF(MoveOnly()) );
     t.join();
   }
   return boost::report_errors();

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-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -77,13 +77,13 @@
 };
 
 MoveOnly MakeMoveOnly() {
- return BOOST_EXPLICIT_MOVE(MoveOnly());
+ return BOOST_THREAD_MAKE_RV_REF(MoveOnly());
 }
 
 int main()
 {
   {
- boost::thread t(( BOOST_EXPLICIT_MOVE(MakeMoveOnly()) ));
+ boost::thread t(( BOOST_THREAD_MAKE_RV_REF(MakeMoveOnly()) ));
     t.join();
   }
   return boost::report_errors();

Modified: trunk/libs/thread/test/threads/thread/constr/move_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/constr/move_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/constr/move_pass.cpp 2012-04-11 13:16:45 EDT (Wed, 11 Apr 2012)
@@ -84,7 +84,7 @@
   }
   BOOST_TEST(G::n_alive == 0);
   {
- boost::thread t1((BOOST_EXPLICIT_MOVE(make_thread())));
+ boost::thread t1((BOOST_THREAD_MAKE_RV_REF(make_thread())));
     t1.join();
     BOOST_TEST(G::op_run);
   }


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