diff --git a/include/boost/fiber/context.hpp b/include/boost/fiber/context.hpp index b0777c26..4b109a0c 100644 --- a/include/boost/fiber/context.hpp +++ b/include/boost/fiber/context.hpp @@ -254,7 +254,7 @@ public: static void reset_active() noexcept; // main fiber context - context( main_context_t); + context( main_context_t) noexcept; // dispatcher fiber context context( dispatcher_context_t, boost::context::preallocated const&, @@ -272,7 +272,7 @@ public: // mutable: generated operator() is not const -> enables std::move( fn) // std::make_tuple: stores decayed copies of its args, implicitly unwraps std::reference_wrapper [this,fn_=std::forward< Fn >( fn),tpl_=std::make_tuple( std::forward< Args >( args) ...), - ctx=boost::context::execution_context::current()] (void *) mutable -> void { + ctx=boost::context::execution_context::current()] (void *) mutable noexcept { try { auto fn( std::move( fn_) ); auto tpl( std::move( tpl_) ); @@ -305,7 +305,7 @@ public: ctx_(); } - virtual ~context(); + virtual ~context() noexcept; scheduler * get_scheduler() const noexcept; @@ -445,7 +445,7 @@ public: struct context_initializer { context_initializer(); - ~context_initializer(); + ~context_initializer() noexcept; }; template< typename StackAlloc, typename Fn, typename ... Args > diff --git a/src/context.cpp b/src/context.cpp index b2bfad72..b5bcf965 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -115,7 +115,7 @@ context_initializer::context_initializer() { } } -context_initializer::~context_initializer() { +context_initializer::~context_initializer() noexcept { if ( 0 == --counter) { context * main_ctx = context::active_; BOOST_ASSERT( main_ctx->is_main_context() ); @@ -147,7 +147,7 @@ context::reset_active() noexcept { } // main fiber context -context::context( main_context_t) : +context::context( main_context_t) noexcept : use_count_( 1), // allocated on main- or thread-stack flags_( flag_main_context), scheduler_( nullptr), @@ -195,7 +195,7 @@ context::context( dispatcher_context_t, boost::context::preallocated const& pall properties_( nullptr) { } -context::~context() { +context::~context() noexcept { BOOST_ASSERT( wait_queue_.empty() ); BOOST_ASSERT( ! ready_is_linked() ); BOOST_ASSERT( ! remote_ready_is_linked() );