Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82311 - in trunk: boost/thread boost/thread/detail libs/thread/test/sync/futures/async libs/thread/test/sync/mutual_exclusion/locks/lock_guard libs/thread/test/sync/mutual_exclusion/locks/nested_strict_lock libs/thread/test/sync/mutual_exclusion/locks/strict_lock libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons
From: vicente.botet_at_[hidden]
Date: 2013-01-01 19:04:35


Author: viboes
Date: 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
New Revision: 82311
URL: http://svn.boost.org/trac/boost/changeset/82311

Log:
Thread: replace BOOST_NO_CXX11_HDR_INITIALIZER_LIST by specific BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST that takes in account that gcc up to 4.6 doens't supports it as expected
Text files modified:
   trunk/boost/thread/detail/config.hpp | 7 +++++
   trunk/boost/thread/detail/lockable_wrapper.hpp | 6 +++-
   trunk/boost/thread/lock_guard.hpp | 5 ++-
   trunk/boost/thread/strict_lock.hpp | 7 +++--
   trunk/libs/thread/test/sync/futures/async/async_pass.cpp | 3 ++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp | 6 +++-
   trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp | 9 +-----
   trunk/libs/thread/test/sync/mutual_exclusion/locks/nested_strict_lock/make_nested_strict_lock_pass.cpp | 9 +-----
   trunk/libs/thread/test/sync/mutual_exclusion/locks/strict_lock/make_strict_lock_pass.cpp | 9 +-----
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_adopt_lock_pass.cpp | 19 ++++++---------
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_defer_lock_pass.cpp | 18 ++++++--------
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp | 33 ++++++++++++++++++++-------
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_try_to_lock_pass.cpp | 48 +++++++++++++++++++++++++++------------
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_locks_mutex_pass.cpp | 4 ++
   14 files changed, 107 insertions(+), 76 deletions(-)

Modified: trunk/boost/thread/detail/config.hpp
==============================================================================
--- trunk/boost/thread/detail/config.hpp (original)
+++ trunk/boost/thread/detail/config.hpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -66,6 +66,13 @@
 #define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
 #endif
 
+
+#if defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
+#elif defined __GNUC__ && (__GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ <= 6 ))
+#define BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
+#endif
+
 /// BASIC_THREAD_ID
 // todo to be removed for 1.54
 #if ! defined BOOST_THREAD_DONT_PROVIDE_BASIC_THREAD_ID \

Modified: trunk/boost/thread/detail/lockable_wrapper.hpp
==============================================================================
--- trunk/boost/thread/detail/lockable_wrapper.hpp (original)
+++ trunk/boost/thread/detail/lockable_wrapper.hpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -6,7 +6,9 @@
 #ifndef BOOST_THREAD_DETAIL_LOCKABLE_WRAPPER_HPP
 #define BOOST_THREAD_DETAIL_LOCKABLE_WRAPPER_HPP
 
-#if ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <boost/thread/detail/config.hpp>
+
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
 #include <initializer_list>
 #endif
 #include <boost/config/abi_prefix.hpp>
@@ -14,7 +16,7 @@
 namespace boost
 {
 
-#if ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
   namespace thread_detail
   {
     template <typename Mutex>

Modified: trunk/boost/thread/lock_guard.hpp
==============================================================================
--- trunk/boost/thread/lock_guard.hpp (original)
+++ trunk/boost/thread/lock_guard.hpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -7,6 +7,7 @@
 #ifndef BOOST_THREAD_LOCK_GUARD_HPP
 #define BOOST_THREAD_LOCK_GUARD_HPP
 
+#include <boost/thread/detail/config.hpp>
 #include <boost/thread/detail/delete.hpp>
 #include <boost/thread/detail/move.hpp>
 #include <boost/thread/detail/lockable_wrapper.hpp>
@@ -45,7 +46,7 @@
 #endif
     }
 
-#if ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
     lock_guard(std::initializer_list<thread_detail::lockable_wrapper<Mutex> > l_) :
       m(*(const_cast<thread_detail::lockable_wrapper<Mutex>*>(l_.begin())->m))
     {
@@ -68,7 +69,7 @@
   };
 
 
-#if ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
   template <typename Lockable>
   lock_guard<Lockable> make_lock_guard(Lockable& mtx)
   {

Modified: trunk/boost/thread/strict_lock.hpp
==============================================================================
--- trunk/boost/thread/strict_lock.hpp (original)
+++ trunk/boost/thread/strict_lock.hpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -6,6 +6,7 @@
 #ifndef BOOST_THREAD_STRICT_LOCK_HPP
 #define BOOST_THREAD_STRICT_LOCK_HPP
 
+#include <boost/thread/detail/config.hpp>
 #include <boost/thread/detail/delete.hpp>
 #include <boost/thread/detail/lockable_wrapper.hpp>
 #include <boost/thread/lock_options.hpp>
@@ -50,7 +51,7 @@
     } /*< locks on construction >*/
 
 
-#if ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
     strict_lock(std::initializer_list<thread_detail::lockable_wrapper<Lockable> > l_) :
       mtx_(*(const_cast<thread_detail::lockable_wrapper<Lockable>*>(l_.begin())->m))
     {
@@ -148,7 +149,7 @@
       tmp_lk_ = move(lk); /*< Move ownership to temporary lk >*/
     }
 
-#if ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
     nested_strict_lock(std::initializer_list<thread_detail::lockable_wrapper<Lock> > l_) :
       lk_(*(const_cast<thread_detail::lockable_wrapper<Lock>*>(l_.begin())->m))
     {
@@ -203,7 +204,7 @@
   {
   };
 
-#if ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
   template <typename Lockable>
   strict_lock<Lockable> make_strict_lock(Lockable& mtx)
   {

Modified: trunk/libs/thread/test/sync/futures/async/async_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/async/async_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/async/async_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -166,6 +166,7 @@
     BOOST_TEST(f.get() == 3);
     Clock::time_point t1 = Clock::now();
     BOOST_TEST(t1 - t0 < ms(100));
+ std::cout << __FILE__ <<"["<<__LINE__<<"] "<< (t1 - t0).count() << std::endl;
     } catch (std::exception& ex) {
       std::cout << __FILE__ <<"["<<__LINE__<<"]"<<ex.what() << std::endl;
       BOOST_TEST(false && "exception thrown");
@@ -216,6 +217,7 @@
     BOOST_TEST(&f.get() == &i);
     Clock::time_point t1 = Clock::now();
     BOOST_TEST(t1 - t0 < ms(100));
+ std::cout << __FILE__ <<"["<<__LINE__<<"] "<< (t1 - t0).count() << std::endl;
     } catch (std::exception& ex) {
       std::cout << __FILE__ <<"["<<__LINE__<<"]"<<ex.what() << std::endl;
       BOOST_TEST(false && "exception thrown");
@@ -303,6 +305,7 @@
     f.get();
     Clock::time_point t1 = Clock::now();
     BOOST_TEST(t1 - t0 < ms(100));
+ std::cout << __FILE__ <<"["<<__LINE__<<"] "<< (t1 - t0).count() << std::endl;
     } catch (std::exception& ex) {
       std::cout << __FILE__ <<"["<<__LINE__<<"]"<<ex.what() << std::endl;
       BOOST_TEST(false && "exception thrown");

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -17,6 +17,8 @@
 // template <class Lockable>
 // lock_guard<Lockable> make_lock_guard(Lockable &, adopt_lock_t);
 
+#define BOOST_THREAD_VERSION 4
+
 #include <boost/thread/lock_guard.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread.hpp>
@@ -32,7 +34,7 @@
 #endif
 boost::mutex m;
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
 
 void f()
 {
@@ -63,7 +65,7 @@
 
 int main()
 {
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
   m.lock();
   boost::thread t(f);
 #ifdef BOOST_THREAD_USES_CHRONO

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -18,10 +18,7 @@
 // lock_guard<Lockable> make_lock_guard(Lockable &);
 
 #define BOOST_THREAD_VERSION 4
-#define BOOST_THREAD_USES_LOG
-#define BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
 
-#include <boost/thread/detail/log.hpp>
 #include <boost/thread/lock_guard.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread.hpp>
@@ -38,7 +35,7 @@
 
 boost::mutex m;
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST && defined BOOST_THREAD_USES_CHRONO
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST && defined BOOST_THREAD_USES_CHRONO
 
 void f()
 {
@@ -47,9 +44,7 @@
   {
     const auto&& lg = boost::make_lock_guard(m); (void)lg;
     t1 = Clock::now();
- BOOST_THREAD_TRACE;
   }
- BOOST_THREAD_TRACE;
   ns d = t1 - t0 - ms(250);
   // This test is spurious as it depends on the time the thread system switches the threads
   BOOST_TEST(d < ns(2500000)+ms(1000)); // within 2.5ms
@@ -59,7 +54,7 @@
 int main()
 {
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
   {
     m.lock();
     boost::thread t(f);

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/nested_strict_lock/make_nested_strict_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/nested_strict_lock/make_nested_strict_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/nested_strict_lock/make_nested_strict_lock_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -9,10 +9,7 @@
 // strict_lock<Lockable> make_strict_lock(Lockable &);
 
 #define BOOST_THREAD_VERSION 4
-#define BOOST_THREAD_USES_LOG
-#define BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
 
-#include <boost/thread/detail/log.hpp>
 #include <boost/thread/lock_types.hpp>
 #include <boost/thread/strict_lock.hpp>
 #include <boost/thread/mutex.hpp>
@@ -30,7 +27,7 @@
 
 boost::mutex m;
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST && defined BOOST_THREAD_USES_CHRONO
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST && defined BOOST_THREAD_USES_CHRONO
 
 void f()
 {
@@ -40,9 +37,7 @@
   {
     const auto&& nlg = boost::make_nested_strict_lock(lg); (void)nlg;
     t1 = Clock::now();
- BOOST_THREAD_TRACE;
   }
- BOOST_THREAD_TRACE;
   ns d = t1 - t0 - ms(250);
   // This test is spurious as it depends on the time the thread system switches the threads
   BOOST_TEST(d < ns(2500000)+ms(1000)); // within 2.5ms
@@ -52,7 +47,7 @@
 int main()
 {
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
   {
     m.lock();
     boost::thread t(f);

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/strict_lock/make_strict_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/strict_lock/make_strict_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/strict_lock/make_strict_lock_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -9,10 +9,7 @@
 // strict_lock<Lockable> make_strict_lock(Lockable &);
 
 #define BOOST_THREAD_VERSION 4
-#define BOOST_THREAD_USES_LOG
-#define BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
 
-#include <boost/thread/detail/log.hpp>
 #include <boost/thread/strict_lock.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread.hpp>
@@ -29,7 +26,7 @@
 
 boost::mutex m;
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST && defined BOOST_THREAD_USES_CHRONO
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST && defined BOOST_THREAD_USES_CHRONO
 
 void f()
 {
@@ -38,9 +35,7 @@
   {
     const auto&& lg = boost::make_strict_lock(m); (void)lg;
     t1 = Clock::now();
- BOOST_THREAD_TRACE;
   }
- BOOST_THREAD_TRACE;
   ns d = t1 - t0 - ms(250);
   // This test is spurious as it depends on the time the thread system switches the threads
   BOOST_TEST(d < ns(2500000)+ms(1000)); // within 2.5ms
@@ -50,7 +45,7 @@
 int main()
 {
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
   {
     m.lock();
     boost::thread t(f);

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_adopt_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_adopt_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_adopt_lock_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -8,27 +8,24 @@
 // template <class Mutex> class unique_lock;
 // unique_lock<Mutex> make_unique_lock(Mutex&, adopt_lock_t);
 
+#define BOOST_THREAD_VERSION 4
+
 #include <boost/thread/lock_factories.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-
 int main()
 {
   boost::mutex m;
   m.lock();
- auto lk = boost::make_unique_lock(m, boost::adopt_lock);
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ lk = boost::make_unique_lock(m, boost::adopt_lock);
   BOOST_TEST(lk.mutex() == &m);
   BOOST_TEST(lk.owns_lock() == true);
 
   return boost::report_errors();
 }
-
-#else
-int main()
-{
- return boost::report_errors();
-}
-#endif
-

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_defer_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_defer_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_defer_lock_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -10,26 +10,24 @@
 
 // unique_lock(mutex_type& m, adopt_lock_t);
 
+#define BOOST_THREAD_VERSION 4
+
 #include <boost/thread/lock_factories.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
 int main()
 {
   boost::mutex m;
   m.lock();
- auto lk = boost::make_unique_lock(m, boost::defer_lock);
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ lk = boost::make_unique_lock(m, boost::defer_lock);
   BOOST_TEST(lk.mutex() == &m);
   BOOST_TEST(lk.owns_lock() == false);
 
   return boost::report_errors();
 }
-
-#else
-int main()
-{
- return boost::report_errors();
-}
-#endif
-

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -8,12 +8,15 @@
 // template <class Mutex>
 // unique_lock<Mutex> make_unique_lock(Mutex&);
 
+#define BOOST_THREAD_VERSION 4
+
+#include <boost/thread/detail/config.hpp>
 #include <boost/thread/lock_factories.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+//#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
 
 boost::mutex m;
 
@@ -33,7 +36,13 @@
   time_point t0 = Clock::now();
   time_point t1;
   {
- auto&& _ = boost::make_unique_lock(m); (void)_;
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ //&&
+ _ = boost::make_unique_lock(m); (void)_;
     t1 = Clock::now();
   }
   ns d = t1 - t0 - ms(250);
@@ -43,7 +52,13 @@
   //time_point t0 = Clock::now();
   //time_point t1;
   {
- auto _ = boost::make_unique_lock(m); (void)_;
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ //&&
+ _ = boost::make_unique_lock(m); (void)_;
     //t1 = Clock::now();
   }
   //ns d = t1 - t0 - ms(250);
@@ -65,10 +80,10 @@
 
   return boost::report_errors();
 }
-#else
-int main()
-{
- return boost::report_errors();
-}
-#endif
+//#else
+//int main()
+//{
+// return boost::report_errors();
+//}
+//#endif
 

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_try_to_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_try_to_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_try_to_lock_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -8,13 +8,14 @@
 // template <class Mutex> class unique_lock;
 // unique_lock<Mutex> make_unique_lock(Mutex&, try_to_lock_t);
 
+#define BOOST_THREAD_VERSION 4
+
+
 #include <boost/thread/lock_factories.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-
 boost::mutex m;
 
 #if defined BOOST_THREAD_USES_CHRONO
@@ -31,20 +32,40 @@
 #if defined BOOST_THREAD_USES_CHRONO
   time_point t0 = Clock::now();
   {
- auto lk = boost::make_unique_lock(m, boost::try_to_lock);
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ lk = boost::make_unique_lock(m, boost::try_to_lock);
     BOOST_TEST(lk.owns_lock() == false);
   }
   {
- auto lk = boost::make_unique_lock(m, boost::try_to_lock);
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ lk = boost::make_unique_lock(m, boost::try_to_lock);
     BOOST_TEST(lk.owns_lock() == false);
   }
   {
- auto lk = boost::make_unique_lock(m, boost::try_to_lock);
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ lk = boost::make_unique_lock(m, boost::try_to_lock);
     BOOST_TEST(lk.owns_lock() == false);
   }
   while (true)
   {
- auto lk = boost::make_unique_lock(m, boost::try_to_lock);
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ lk = boost::make_unique_lock(m, boost::try_to_lock);
     if (lk.owns_lock()) break;
   }
   time_point t1 = Clock::now();
@@ -68,7 +89,12 @@
 // }
   while (true)
   {
- auto lk = boost::make_unique_lock(m, boost::try_to_lock);
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ auto
+#else
+ boost::unique_lock<boost::mutex>
+#endif
+ lk = boost::make_unique_lock(m, boost::try_to_lock);
     if (lk.owns_lock()) break;
   }
   //time_point t1 = Clock::now();
@@ -91,11 +117,3 @@
 
   return boost::report_errors();
 }
-
-#else
-int main()
-{
- return boost::report_errors();
-}
-#endif
-

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_locks_mutex_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_locks_mutex_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_locks_mutex_pass.cpp 2013-01-01 19:04:33 EST (Tue, 01 Jan 2013)
@@ -8,12 +8,14 @@
 // template <class Mutex>
 // unique_lock<Mutex> make_unique_lock(Mutex&);
 
+#define BOOST_THREAD_VERSION 4
+
 #include <boost/thread/lock_factories.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-#if ! defined(BOOST_NO_CXX11_AUTO) && defined BOOST_NO_CXX11_HDR_TUPLE && ! defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && defined BOOST_NO_CXX11_HDR_TUPLE && ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
 
 boost::mutex m1;
 boost::mutex m2;


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