mirror of
https://github.com/boostorg/variant2.git
synced 2025-07-30 04:07:16 +02:00
Add a test case to test/variant_copy_construct
This commit is contained in:
@ -48,6 +48,13 @@ struct Y
|
||||
Y( Y const& ) = delete;
|
||||
};
|
||||
|
||||
struct D
|
||||
{
|
||||
~D() {}
|
||||
};
|
||||
|
||||
inline bool operator==( D, D ) { return true; }
|
||||
|
||||
template<class V> static void test( V const & v )
|
||||
{
|
||||
V v2( v );
|
||||
@ -117,6 +124,8 @@ int main()
|
||||
test( v );
|
||||
}
|
||||
|
||||
test( variant<D>() );
|
||||
|
||||
{
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_nothrow_copy_constructible<variant<int>>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_nothrow_copy_constructible<variant<int const>>));
|
||||
|
Reference in New Issue
Block a user