diff --git a/include/boost/fiber/algorithm.hpp b/include/boost/fiber/algorithm.hpp index 87cc744f..11342a39 100644 --- a/include/boost/fiber/algorithm.hpp +++ b/include/boost/fiber/algorithm.hpp @@ -25,7 +25,7 @@ namespace fibers { class context; struct BOOST_FIBERS_DECL sched_algorithm { - virtual ~sched_algorithm() noexcept {} + virtual ~sched_algorithm() {} virtual void awakened( context *) noexcept = 0; diff --git a/include/boost/fiber/condition.hpp b/include/boost/fiber/condition.hpp index d25cbf94..7460b4a9 100644 --- a/include/boost/fiber/condition.hpp +++ b/include/boost/fiber/condition.hpp @@ -46,7 +46,7 @@ private: public: condition() = default; - ~condition() noexcept { + ~condition() { BOOST_ASSERT( wait_queue_.empty() ); } diff --git a/include/boost/fiber/context.hpp b/include/boost/fiber/context.hpp index d0c52bbc..bb2adba1 100644 --- a/include/boost/fiber/context.hpp +++ b/include/boost/fiber/context.hpp @@ -141,7 +141,7 @@ private: void * vp{ nullptr }; detail::fss_cleanup_function::ptr_t cleanup_function{}; - constexpr fss_data() noexcept = default; + constexpr fss_data() = default; fss_data( void * vp_, detail::fss_cleanup_function::ptr_t const& fn) noexcept : @@ -158,6 +158,16 @@ private: struct data_t { detail::spinlock_lock * lk{ nullptr }; context * ctx{ nullptr }; + + constexpr data_t() = default; + + explicit data_t( detail::spinlock_lock * lk_) noexcept : + lk{ lk_ } { + } + + explicit data_t( context * ctx_) noexcept : + ctx{ ctx_ } { + } }; typedef std::map< uintptr_t, fss_data > fss_data_t; @@ -203,7 +213,7 @@ public: context * impl_{ nullptr }; public: - constexpr id() noexcept = default; + constexpr id() = default; explicit id( context * impl) noexcept : impl_( impl) { @@ -293,7 +303,7 @@ public: }} { } - virtual ~context() noexcept; + virtual ~context(); scheduler * get_scheduler() const noexcept; @@ -437,7 +447,7 @@ public: struct context_initializer { context_initializer(); - ~context_initializer() noexcept; + ~context_initializer(); }; template< typename StackAlloc, typename Fn, typename ... Args > diff --git a/include/boost/fiber/detail/fss.hpp b/include/boost/fiber/detail/fss.hpp index 25b8f187..54dc5b79 100644 --- a/include/boost/fiber/detail/fss.hpp +++ b/include/boost/fiber/detail/fss.hpp @@ -32,7 +32,7 @@ public: fss_cleanup_function() noexcept = default; - virtual ~fss_cleanup_function() noexcept = default; + virtual ~fss_cleanup_function() = default; virtual void operator()( void * data) = 0; diff --git a/include/boost/fiber/fiber.hpp b/include/boost/fiber/fiber.hpp index d1d514cf..29bbc316 100644 --- a/include/boost/fiber/fiber.hpp +++ b/include/boost/fiber/fiber.hpp @@ -42,7 +42,7 @@ private: public: typedef context::id id; - constexpr fiber() noexcept = default; + constexpr fiber() = default; template< typename Fn, typename ... Args > fiber( Fn && fn, Args && ... args) : @@ -56,7 +56,7 @@ public: start_(); } - ~fiber() noexcept { + ~fiber() { if ( joinable() ) { std::terminate(); } diff --git a/include/boost/fiber/fss.hpp b/include/boost/fiber/fss.hpp index ef1a7cdd..c6e9964c 100644 --- a/include/boost/fiber/fss.hpp +++ b/include/boost/fiber/fss.hpp @@ -57,7 +57,7 @@ public: cleanup_fn_{ new custom_cleanup_function( fn) } { } - ~fiber_specific_ptr() noexcept { + ~fiber_specific_ptr() { context * f = context::active(); if ( nullptr != f) { f->set_fss_data( diff --git a/include/boost/fiber/future/detail/shared_state.hpp b/include/boost/fiber/future/detail/shared_state.hpp index f52eba28..4afc0198 100644 --- a/include/boost/fiber/future/detail/shared_state.hpp +++ b/include/boost/fiber/future/detail/shared_state.hpp @@ -96,7 +96,7 @@ protected: public: shared_state_base() = default; - virtual ~shared_state_base() noexcept = default; + virtual ~shared_state_base() = default; shared_state_base( shared_state_base const&) = delete; shared_state_base & operator=( shared_state_base const&) = delete; @@ -184,7 +184,7 @@ public: shared_state() = default; - virtual ~shared_state() noexcept { + virtual ~shared_state() { if ( ready_) { reinterpret_cast< R const* >( storage_)->~R(); } @@ -235,7 +235,7 @@ public: shared_state() = default; - virtual ~shared_state() noexcept = default; + virtual ~shared_state() = default; shared_state( shared_state const&) = delete; shared_state & operator=( shared_state const&) = delete; @@ -275,7 +275,7 @@ public: shared_state() = default; - virtual ~shared_state() noexcept = default; + virtual ~shared_state() = default; shared_state( shared_state const&) = delete; shared_state & operator=( shared_state const&) = delete; diff --git a/include/boost/fiber/future/detail/task_base.hpp b/include/boost/fiber/future/detail/task_base.hpp index a5692baa..34af3d2a 100644 --- a/include/boost/fiber/future/detail/task_base.hpp +++ b/include/boost/fiber/future/detail/task_base.hpp @@ -24,7 +24,7 @@ template< typename R, typename ... Args > struct task_base : public shared_state< R > { typedef intrusive_ptr< task_base > ptr_t; - virtual ~task_base() noexcept { + virtual ~task_base() { } virtual void run( Args && ... args) = 0; diff --git a/include/boost/fiber/future/future.hpp b/include/boost/fiber/future/future.hpp index dafaadc3..64247f79 100644 --- a/include/boost/fiber/future/future.hpp +++ b/include/boost/fiber/future/future.hpp @@ -28,13 +28,13 @@ struct future_base { ptr_t state_{}; - constexpr future_base() noexcept = default; + constexpr future_base() = default; explicit future_base( ptr_t const& p) noexcept : state_{ p } { } - ~future_base() noexcept = default; + ~future_base() = default; future_base( future_base const& other) : state_{ other.state_ } { @@ -106,7 +106,7 @@ private: friend class shared_future< R >; public: - constexpr future() noexcept = default; + constexpr future() = default; explicit future( typename base_t::ptr_t const& p) noexcept : base_t{ p } { @@ -159,7 +159,7 @@ private: friend class shared_future< R & >; public: - constexpr future() noexcept = default; + constexpr future() = default; explicit future( typename base_t::ptr_t const& p) noexcept : base_t{ p } { @@ -212,7 +212,7 @@ private: friend class shared_future< void >; public: - constexpr future() noexcept = default; + constexpr future() = default; explicit future( base_t::ptr_t const& p) noexcept : base_t{ p } { @@ -271,9 +271,9 @@ private: } public: - constexpr shared_future() noexcept = default; + constexpr shared_future() = default; - ~shared_future() noexcept = default; + ~shared_future() = default; shared_future( shared_future const& other) : base_t{ other } { @@ -336,9 +336,9 @@ private: } public: - constexpr shared_future() noexcept = default; + constexpr shared_future() = default; - ~shared_future() noexcept = default; + ~shared_future() = default; shared_future( shared_future const& other) : base_t{ other } { @@ -401,9 +401,9 @@ private: } public: - constexpr shared_future() noexcept = default; + constexpr shared_future() = default; - ~shared_future() noexcept = default; + ~shared_future() = default; inline shared_future( shared_future const& other) : diff --git a/include/boost/fiber/future/packaged_task.hpp b/include/boost/fiber/future/packaged_task.hpp index ef179937..92425329 100644 --- a/include/boost/fiber/future/packaged_task.hpp +++ b/include/boost/fiber/future/packaged_task.hpp @@ -33,9 +33,9 @@ private: ptr_t task_{}; public: - constexpr packaged_task() noexcept = default; + constexpr packaged_task() = default; - ~packaged_task() noexcept { + ~packaged_task() { if ( task_) { task_->owner_destroyed(); } diff --git a/include/boost/fiber/future/promise.hpp b/include/boost/fiber/future/promise.hpp index e84816d1..80589b37 100644 --- a/include/boost/fiber/future/promise.hpp +++ b/include/boost/fiber/future/promise.hpp @@ -50,7 +50,7 @@ public: ::new( a.allocate( 1) ) object_t{ a } }; } - ~promise() noexcept { + ~promise() { if ( future_) { future_->owner_destroyed(); } @@ -139,7 +139,7 @@ public: ::new( a.allocate( 1) ) object_t{ a } }; } - ~promise() noexcept { + ~promise() { if ( future_) { future_->owner_destroyed(); } @@ -221,7 +221,7 @@ public: ::new( a.allocate( 1) ) object_t{ a } }; } - ~promise() noexcept { + ~promise() { if ( future_) { future_->owner_destroyed(); } diff --git a/include/boost/fiber/interruption.hpp b/include/boost/fiber/interruption.hpp index c9d42683..fb7cefb9 100644 --- a/include/boost/fiber/interruption.hpp +++ b/include/boost/fiber/interruption.hpp @@ -31,7 +31,7 @@ private: public: disable_interruption() noexcept; - ~disable_interruption() noexcept; + ~disable_interruption(); disable_interruption( disable_interruption const&) = delete; disable_interruption & operator=( disable_interruption const&) = delete; @@ -44,7 +44,7 @@ private: public: explicit restore_interruption( disable_interruption & disabler) noexcept; - ~restore_interruption() noexcept; + ~restore_interruption(); restore_interruption( restore_interruption const&) = delete; restore_interruption & operator=( restore_interruption const&) = delete; diff --git a/include/boost/fiber/mutex.hpp b/include/boost/fiber/mutex.hpp index b57bbc50..823882cf 100644 --- a/include/boost/fiber/mutex.hpp +++ b/include/boost/fiber/mutex.hpp @@ -37,7 +37,7 @@ private: public: mutex() = default; - ~mutex() noexcept { + ~mutex() { BOOST_ASSERT( nullptr == owner_); BOOST_ASSERT( wait_queue_.empty() ); } diff --git a/include/boost/fiber/properties.hpp b/include/boost/fiber/properties.hpp index 56d1ed51..dd450bc8 100644 --- a/include/boost/fiber/properties.hpp +++ b/include/boost/fiber/properties.hpp @@ -52,7 +52,7 @@ public: // We need a virtual destructor (hence a vtable) because fiber_properties // is stored polymorphically (as fiber_properties*) in context, and // destroyed via that pointer. - virtual ~fiber_properties() noexcept = default; + virtual ~fiber_properties() = default; // not really intended for public use, but sched_algorithm_with_properties // must be able to call this diff --git a/include/boost/fiber/scheduler.hpp b/include/boost/fiber/scheduler.hpp index 538a0053..5fb78376 100644 --- a/include/boost/fiber/scheduler.hpp +++ b/include/boost/fiber/scheduler.hpp @@ -101,7 +101,7 @@ public: scheduler( scheduler const&) = delete; scheduler & operator=( scheduler const&) = delete; - virtual ~scheduler() noexcept; + virtual ~scheduler(); void dispatch() noexcept; diff --git a/src/context.cpp b/src/context.cpp index 61b1eb62..d52ef28a 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -222,7 +222,7 @@ context::resume( detail::spinlock_lock & lk) noexcept { // active_ will point to `this` // prev will point to previous active context std::swap( active_, prev); - data_t d{ & lk, nullptr }; + data_t d{ & lk }; resume_( d); } @@ -232,7 +232,7 @@ context::resume( context * ready_ctx) noexcept { // active_ will point to `this` // prev will point to previous active context std::swap( active_, prev); - data_t d{ nullptr, ready_ctx }; + data_t d{ ready_ctx }; resume_( d); }