forked from boostorg/variant2
Fix tests when X3 is not v2d::trivially_move_assignable
This commit is contained in:
@ -230,8 +230,18 @@ int main()
|
||||
}
|
||||
catch( std::exception const& )
|
||||
{
|
||||
// all trivially destructible and move-assignable, no change
|
||||
BOOST_TEST_EQ( v.index(), 0 );
|
||||
// X3 is not v2d::trivially_move_assignable on libstdc++ 4.x
|
||||
|
||||
if( v2d::is_trivially_move_assignable<X3>::value )
|
||||
{
|
||||
// all trivially destructible and move-assignable, no change
|
||||
BOOST_TEST_EQ( v.index(), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// basic guarantee; X1 is nothrow default-constructible
|
||||
BOOST_TEST_EQ( v.index(), 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,8 +257,18 @@ int main()
|
||||
}
|
||||
catch( std::exception const& )
|
||||
{
|
||||
// all trivially destructible and move-assignable, no change
|
||||
BOOST_TEST_EQ( v.index(), 0 );
|
||||
// X3 is not v2d::trivially_move_assignable on libstdc++ 4.x
|
||||
|
||||
if( v2d::is_trivially_move_assignable<X3>::value )
|
||||
{
|
||||
// all trivially destructible and move-assignable, no change
|
||||
BOOST_TEST_EQ( v.index(), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// basic guarantee; monostate
|
||||
BOOST_TEST_EQ( v.index(), 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user