From e347ecbff12bcd9986f466e84252303b1f79eee3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 2 Jun 2017 23:28:51 +0300 Subject: [PATCH] Simplify bad_expected_access a bit --- include/boost/variant2/expected.hpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/boost/variant2/expected.hpp b/include/boost/variant2/expected.hpp index 4673ab5..d2b6581 100644 --- a/include/boost/variant2/expected.hpp +++ b/include/boost/variant2/expected.hpp @@ -78,17 +78,10 @@ private: public: explicit bad_expected_access( E const& e ) - noexcept( std::is_nothrow_copy_constructible::value ) : bad_expected_access( "bad_expected_access<" + boost::core::demangle( typeid(E).name() ) + ">" + variant2::detail::add_value( e ) ), e_( e ) { } - explicit bad_expected_access( E&& e ) - noexcept( std::is_nothrow_move_constructible::value ) - : bad_expected_access( "bad_expected_access<" + boost::core::demangle( typeid(E).name() ) + ">" + variant2::detail::add_value( e ) ), e_( std::move(e) ) - { - } - E error() const { return e_;