mirror of
https://github.com/boostorg/variant2.git
synced 2025-07-30 12:17:16 +02:00
Simplify bad_expected_access<E> a bit
This commit is contained in:
@ -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_;
|
||||
|
Reference in New Issue
Block a user