From 0d9ebfc820f8a8af8daa3abbd30e49d53bf9f2d2 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 26 Jul 2012 08:08:06 +0000 Subject: [PATCH] Fixed compilation when Boost.Chrono is disabled by user. [SVN r79753] --- include/boost/thread/win32/basic_timed_mutex.hpp | 2 ++ include/boost/thread/win32/shared_mutex.hpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/boost/thread/win32/basic_timed_mutex.hpp b/include/boost/thread/win32/basic_timed_mutex.hpp index 340f1200..30580e7c 100644 --- a/include/boost/thread/win32/basic_timed_mutex.hpp +++ b/include/boost/thread/win32/basic_timed_mutex.hpp @@ -159,6 +159,7 @@ namespace boost return timed_lock(system_time(timeout)); } +#ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { @@ -209,6 +210,7 @@ namespace boost } return true; } +#endif void unlock() { diff --git a/include/boost/thread/win32/shared_mutex.hpp b/include/boost/thread/win32/shared_mutex.hpp index 78b6001d..fef2d5ba 100644 --- a/include/boost/thread/win32/shared_mutex.hpp +++ b/include/boost/thread/win32/shared_mutex.hpp @@ -221,6 +221,7 @@ namespace boost } } +#ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_shared_for(const chrono::duration& rel_time) { @@ -327,6 +328,7 @@ namespace boost BOOST_ASSERT(res==0); } } +#endif void unlock_shared() { @@ -490,7 +492,7 @@ namespace boost } } - +#ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { @@ -598,6 +600,7 @@ namespace boost BOOST_ASSERT(wait_res<2); } } +#endif void unlock() {