Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77460 - trunk/boost/thread
From: vicente.botet_at_[hidden]
Date: 2012-03-21 17:05:27


Author: viboes
Date: 2012-03-21 17:05:26 EDT (Wed, 21 Mar 2012)
New Revision: 77460
URL: http://svn.boost.org/trac/boost/changeset/77460

Log:
Thread: Protect uses of Boost.Chrono for compilers don't providing support for
Text files modified:
   trunk/boost/thread/locks.hpp | 8 ++++++--
   1 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/boost/thread/locks.hpp
==============================================================================
--- trunk/boost/thread/locks.hpp (original)
+++ trunk/boost/thread/locks.hpp 2012-03-21 17:05:26 EDT (Wed, 21 Mar 2012)
@@ -490,6 +490,7 @@
               m = ul.release();
             }
         }
+#ifdef BOOST_THREAD_USES_CHRONO
         template <class Clock, class Duration>
         unique_lock(upgrade_lock<mutex_type>&& ul,
                     const chrono::time_point<Clock, Duration>& abs_time)
@@ -525,7 +526,7 @@
             m = ul.release();
           }
         }
-
+#endif
 #else
 
 #if defined BOOST_THREAD_USES_MOVE
@@ -545,6 +546,7 @@
               m = ul.release();
             }
         }
+#ifdef BOOST_THREAD_USES_CHRONO
         template <class Clock, class Duration>
         unique_lock(boost::rv<upgrade_lock<mutex_type> > &ul,
                     const chrono::time_point<Clock, Duration>& abs_time)
@@ -580,6 +582,7 @@
             m = ul.release();
           }
         }
+#endif
 #else
         // Conversion from upgrade locking
         unique_lock(detail::thread_move_t<upgrade_lock<mutex_type> > ul, try_to_lock_t)
@@ -597,6 +600,7 @@
               m = ul.release();
             }
         }
+#ifdef BOOST_THREAD_USES_CHRONO
         template <class Clock, class Duration>
         unique_lock(detail::thread_move_t<upgrade_lock<mutex_type> > ul,
                     const chrono::time_point<Clock, Duration>& abs_time)
@@ -634,6 +638,7 @@
         }
 #endif
 #endif
+#endif
 
         void swap(unique_lock& other) BOOST_NOEXCEPT
         {
@@ -1213,7 +1218,6 @@
   {};
 #endif
 
-
     template<typename Mutex>
     void swap(shared_lock<Mutex>& lhs,shared_lock<Mutex>& rhs)
     {


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