diff --git a/include/boost/leaf/context.hpp b/include/boost/leaf/context.hpp index 30115c8..075ab75 100644 --- a/include/boost/leaf/context.hpp +++ b/include/boost/leaf/context.hpp @@ -240,12 +240,6 @@ namespace boost { namespace leaf { protected: - template - decltype(std::declval()()) try_catch_( TryBlock &&, H && ... ) const; - - template - decltype(std::declval()()) remote_try_catch_( TryBlock &&, RemoteH && ) const; - template typename std::decay().value())>::type handle_all( R const &, H && ... ) const noexcept; @@ -259,16 +253,22 @@ namespace boost { namespace leaf { R remote_handle_some( R const &, RemoteH && ) const; template - typename std::decay()().value())>::type try_handle_all( TryBlock &&, H && ... ) const; + typename std::decay()().value())>::type try_handle_all_( TryBlock &&, H && ... ) const; template - typename std::decay()().value())>::type remote_try_handle_all( TryBlock &&, RemoteH && ) const; + typename std::decay()().value())>::type remote_try_handle_all_( TryBlock &&, RemoteH && ) const; template - typename std::decay()())>::type try_handle_some( context_activator &, TryBlock &&, H && ... ) const; + typename std::decay()())>::type try_handle_some_( context_activator &, TryBlock &&, H && ... ) const; template - typename std::decay()())>::type remote_try_handle_some( context_activator &, TryBlock &&, RemoteH && ) const; + typename std::decay()())>::type remote_try_handle_some_( context_activator &, TryBlock &&, RemoteH && ) const; + + template + decltype(std::declval()()) try_catch_( TryBlock &&, H && ... ) const; + + template + decltype(std::declval()()) remote_try_catch_( TryBlock &&, RemoteH && ) const; }; template diff --git a/include/boost/leaf/detail/handle.hpp b/include/boost/leaf/detail/handle.hpp index 3bc18f4..e8366a8 100644 --- a/include/boost/leaf/detail/handle.hpp +++ b/include/boost/leaf/detail/handle.hpp @@ -790,7 +790,7 @@ namespace boost { namespace leaf { template template - typename std::decay()().value())>::type context_base::try_handle_all( TryBlock && try_block, H && ... h ) const + typename std::decay()().value())>::type context_base::try_handle_all_( TryBlock && try_block, H && ... h ) const { using namespace leaf_detail; static_assert(is_result_type()())>::value, "The return type of the try_block passed to a try_handle_all function must be registered with leaf::is_result_type"); @@ -803,7 +803,7 @@ namespace boost { namespace leaf { template template - typename std::decay()().value())>::type context_base::remote_try_handle_all( TryBlock && try_block, RemoteH && h ) const + typename std::decay()().value())>::type context_base::remote_try_handle_all_( TryBlock && try_block, RemoteH && h ) const { using namespace leaf_detail; static_assert(is_result_type()())>::value, "The return type of the try_block passed to a remote_try_handle_all function must be registered with leaf::is_result_type"); @@ -816,7 +816,7 @@ namespace boost { namespace leaf { template template - typename std::decay()())>::type context_base::try_handle_some( context_activator & active_context, TryBlock && try_block, H && ... h ) const + typename std::decay()())>::type context_base::try_handle_some_( context_activator & active_context, TryBlock && try_block, H && ... h ) const { using namespace leaf_detail; static_assert(is_result_type()())>::value, "The return type of the try_block passed to a try_handle_some function must be registered with leaf::is_result_type"); @@ -834,7 +834,7 @@ namespace boost { namespace leaf { template template - typename std::decay()())>::type context_base::remote_try_handle_some( context_activator & active_context, TryBlock && try_block, RemoteH && h ) const + typename std::decay()())>::type context_base::remote_try_handle_some_( context_activator & active_context, TryBlock && try_block, RemoteH && h ) const { using namespace leaf_detail; static_assert(is_result_type()())>::value, "The return type of the try_block passed to a remote_try_handle_some function must be registered with leaf::is_result_type"); diff --git a/include/boost/leaf/handle_error.hpp b/include/boost/leaf/handle_error.hpp index 4dc81b1..a0d4e09 100644 --- a/include/boost/leaf/handle_error.hpp +++ b/include/boost/leaf/handle_error.hpp @@ -18,7 +18,7 @@ namespace boost { namespace leaf { typename std::decay()().value())>::type nocatch_context::try_handle_all( TryBlock && try_block, H && ... h ) noexcept { context_activator active_context(*this, context_activator::on_deactivation::do_not_propagate); - return context_base::try_handle_all( std::forward(try_block), std::forward(h)... ); + return this->try_handle_all_( std::forward(try_block), std::forward(h)... ); } template @@ -26,7 +26,7 @@ namespace boost { namespace leaf { typename std::decay()().value())>::type nocatch_context::remote_try_handle_all( TryBlock && try_block, RemoteH && h ) noexcept { context_activator active_context(*this, context_activator::on_deactivation::do_not_propagate); - return context_base::remote_try_handle_all( std::forward(try_block), std::forward(h) ); + return this->remote_try_handle_all_( std::forward(try_block), std::forward(h) ); } template @@ -34,7 +34,7 @@ namespace boost { namespace leaf { typename std::decay()())>::type nocatch_context::try_handle_some( TryBlock && try_block, H && ... h ) { context_activator active_context(*this, context_activator::on_deactivation::propagate_if_uncaught_exception); - return context_base::try_handle_some( active_context, std::forward(try_block), std::forward(h)... ); + return this->try_handle_some_( active_context, std::forward(try_block), std::forward(h)... ); } template @@ -42,7 +42,7 @@ namespace boost { namespace leaf { typename std::decay()())>::type nocatch_context::remote_try_handle_some( TryBlock && try_block, RemoteH && h ) { context_activator active_context(*this, context_activator::on_deactivation::propagate_if_uncaught_exception); - return context_base::remote_try_handle_some( active_context, std::forward(try_block), std::forward(h) ); + return this->remote_try_handle_some_( active_context, std::forward(try_block), std::forward(h) ); } } diff --git a/include/boost/leaf/handle_exception.hpp b/include/boost/leaf/handle_exception.hpp index dac0951..13e8666 100644 --- a/include/boost/leaf/handle_exception.hpp +++ b/include/boost/leaf/handle_exception.hpp @@ -51,7 +51,7 @@ namespace boost { namespace leaf { return this->try_catch_( [&] { - return context_base::try_handle_all( std::forward(try_block), std::forward(h)... ); + return this->try_handle_all_( std::forward(try_block), std::forward(h)... ); }, std::forward(h)...); } @@ -64,7 +64,7 @@ namespace boost { namespace leaf { return this->try_catch_( [&] { - return context_base::remote_try_handle_all( std::forward(try_block), std::forward(h) ); + return this->remote_try_handle_all_( std::forward(try_block), std::forward(h) ); }, std::forward(h)); } @@ -77,7 +77,7 @@ namespace boost { namespace leaf { return this->try_catch_( [&] { - return context_base::try_handle_some( active_context, std::forward(try_block), std::forward(h)... ); + return this->try_handle_some_( active_context, std::forward(try_block), std::forward(h)... ); }, std::forward(h)...); } @@ -90,7 +90,7 @@ namespace boost { namespace leaf { return this->try_catch_( [&] { - return context_base::remote_try_handle_some( active_context, std::forward(try_block), std::forward(h) ); + return this->remote_try_handle_some_( active_context, std::forward(try_block), std::forward(h) ); }, std::forward(h)); }