Revert incorrect changes in test/variant_trivial

This commit is contained in:
Peter Dimov
2020-01-23 18:09:01 +02:00
parent b649a39776
commit 8cf72527a6

View File

@ -37,8 +37,6 @@ template<template<class...> class L, class T1, class... T> struct mp_power_set_i
//
using namespace boost::variant2;
struct D
{
~D() noexcept {}
@ -84,20 +82,23 @@ struct MA2
MA2& operator=( MA2 && ) = delete;
};
using namespace boost::variant2;
namespace v2d = boost::variant2::detail;
struct test
{
template<class... T> void operator()( mp_list<T...> ) const noexcept
{
using U = mp_inherit<T...>;
BOOST_TEST_EQ( std::is_trivially_copy_constructible<variant<U>>::value, std::is_trivially_copy_constructible<U>::value );
BOOST_TEST_EQ( std::is_trivially_copy_assignable<variant<U>>::value, std::is_trivially_destructible<U>::value && std::is_trivially_copy_constructible<U>::value && std::is_trivially_copy_assignable<U>::value );
BOOST_TEST_EQ( v2d::is_trivially_copy_constructible<variant<U>>::value, v2d::is_trivially_copy_constructible<U>::value );
BOOST_TEST_EQ( v2d::is_trivially_copy_assignable<variant<U>>::value, std::is_trivially_destructible<U>::value && v2d::is_trivially_copy_constructible<U>::value && v2d::is_trivially_copy_assignable<U>::value );
BOOST_TEST_EQ( std::is_trivially_destructible<variant<U>>::value, std::is_trivially_destructible<U>::value );
#if !BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000)
BOOST_TEST_EQ( std::is_trivially_move_constructible<variant<U>>::value, std::is_trivially_move_constructible<U>::value );
BOOST_TEST_EQ( std::is_trivially_move_assignable<variant<U>>::value, std::is_trivially_destructible<U>::value && std::is_trivially_move_constructible<U>::value && std::is_trivially_move_assignable<U>::value );
BOOST_TEST_EQ( v2d::is_trivially_move_constructible<variant<U>>::value, v2d::is_trivially_move_constructible<U>::value );
BOOST_TEST_EQ( v2d::is_trivially_move_assignable<variant<U>>::value, std::is_trivially_destructible<U>::value && v2d::is_trivially_move_constructible<U>::value && v2d::is_trivially_move_assignable<U>::value );
#endif
}