diff --git a/test/variant_valueless.cpp b/test/variant_valueless.cpp index 34b90af..6a13086 100644 --- a/test/variant_valueless.cpp +++ b/test/variant_valueless.cpp @@ -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::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::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 ); + } } }