From d1284b02ad7bceb045c2f42a926108907d68aa14 Mon Sep 17 00:00:00 2001 From: huangqinjin Date: Fri, 31 Aug 2018 10:45:06 +0800 Subject: [PATCH] fix compilation with BOOST_NO_EXCEPTIONS --- include/boost/thread/future.hpp | 6 +++--- src/future.cpp | 9 +-------- src/pthread/thread.cpp | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/include/boost/thread/future.hpp b/include/boost/thread/future.hpp index f4b3fb96..55afca8f 100644 --- a/include/boost/thread/future.hpp +++ b/include/boost/thread/future.hpp @@ -18,11 +18,11 @@ #ifdef BOOST_NO_EXCEPTIONS namespace boost { - +namespace detail { struct shared_state_base { - void notify_deferred(); + void notify_deferred() {} }; - +} } #else diff --git a/src/future.cpp b/src/future.cpp index 35b8853f..a477e709 100644 --- a/src/future.cpp +++ b/src/future.cpp @@ -5,14 +5,7 @@ #include -#ifdef BOOST_NO_EXCEPTIONS -namespace boost -{ - void shared_state_base::notify_deferred() {} -} - -#else - +#ifndef BOOST_NO_EXCEPTIONS #include #include diff --git a/src/pthread/thread.cpp b/src/pthread/thread.cpp index bb3d9a17..f8fc44a1 100644 --- a/src/pthread/thread.cpp +++ b/src/pthread/thread.cpp @@ -478,7 +478,7 @@ namespace boost mutex mx; unique_lock lock(mx); condition_variable cond; - cond.do_wait_until(lock, detail::internal_platform_clock::now()) + cond.do_wait_until(lock, detail::internal_platform_clock::now()); # endif } }