From 3f67d3def50ba38902b2db80e23e390ca83be51b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 17 Sep 2021 18:33:04 +0300 Subject: [PATCH] Rename throw_exception_from_error_code to throw_exception_from_error --- doc/system/reference.adoc | 8 ++++---- include/boost/system/result.hpp | 10 +++++----- test/result_value_access.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index 612ee38..d2d4e00 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -1383,9 +1383,9 @@ it requires {cpp}11. namespace boost { namespace system { -// throw_exception_from_error_code +// throw_exception_from_error -BOOST_NORETURN inline void throw_exception_from_error_code( error_code const & e ); +BOOST_NORETURN inline void throw_exception_from_error( error_code const & e ); // in_place_* @@ -1413,10 +1413,10 @@ An implementation for the common and default case where `E` is `error_code` is already provided. It throws `system_error(e)`. If `result` is used with other error types, the user is expected to provide -an appropriate overload of `throw_exception_from_error_code` in the namespace of `E`. +an appropriate overload of `throw_exception_from_error` in the namespace of `E`. ``` -BOOST_NORETURN inline void throw_exception_from_error_code( error_code const & e ); +BOOST_NORETURN inline void throw_exception_from_error( error_code const & e ); ``` [none] * {blank} diff --git a/include/boost/system/result.hpp b/include/boost/system/result.hpp index 7a21488..63672ea 100644 --- a/include/boost/system/result.hpp +++ b/include/boost/system/result.hpp @@ -24,9 +24,9 @@ namespace boost namespace system { -// throw_exception_from_error_code +// throw_exception_from_error -BOOST_NORETURN inline void throw_exception_from_error_code( error_code const & e ) +BOOST_NORETURN inline void throw_exception_from_error( error_code const & e ) { boost::throw_exception( system_error( e ) ); } @@ -180,7 +180,7 @@ public: } else { - throw_exception_from_error_code( variant2::unsafe_get<1>( v_ ) ); + throw_exception_from_error( variant2::unsafe_get<1>( v_ ) ); } } @@ -194,7 +194,7 @@ public: } else { - throw_exception_from_error_code( variant2::unsafe_get<1>( v_ ) ); + throw_exception_from_error( variant2::unsafe_get<1>( v_ ) ); } } @@ -206,7 +206,7 @@ public: } else { - throw_exception_from_error_code( variant2::unsafe_get<1>( v_ ) ); + throw_exception_from_error( variant2::unsafe_get<1>( v_ ) ); } } diff --git a/test/result_value_access.cpp b/test/result_value_access.cpp index ddd5fe7..b8a4630 100644 --- a/test/result_value_access.cpp +++ b/test/result_value_access.cpp @@ -26,7 +26,7 @@ struct E { }; -BOOST_NORETURN void throw_exception_from_error_code( Y const & ) +BOOST_NORETURN void throw_exception_from_error( Y const & ) { throw E(); }