Simplify bad_expected_access<E> a bit

This commit is contained in:
Peter Dimov
2017-06-02 23:28:51 +03:00
parent bdd449ae6a
commit e347ecbff1

View File

@ -78,17 +78,10 @@ private:
public:
explicit bad_expected_access( E const& e )
noexcept( std::is_nothrow_copy_constructible<E>::value )
: bad_expected_access<void>( "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<E>::value )
: bad_expected_access<void>( "bad_expected_access<" + boost::core::demangle( typeid(E).name() ) + ">" + variant2::detail::add_value( e ) ), e_( std::move(e) )
{
}
E error() const
{
return e_;