From d6680df4e5c3d7fca1ff9acc76ced51ba0ff1fcf Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 23 Jan 2020 18:33:39 +0200 Subject: [PATCH] Add a test case to test/variant_copy_construct --- test/variant_copy_construct.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/variant_copy_construct.cpp b/test/variant_copy_construct.cpp index 63c9867..d19e9a3 100644 --- a/test/variant_copy_construct.cpp +++ b/test/variant_copy_construct.cpp @@ -48,6 +48,13 @@ struct Y Y( Y const& ) = delete; }; +struct D +{ + ~D() {} +}; + +inline bool operator==( D, D ) { return true; } + template static void test( V const & v ) { V v2( v ); @@ -117,6 +124,8 @@ int main() test( v ); } + test( variant() ); + { BOOST_TEST_TRAIT_TRUE((std::is_nothrow_copy_constructible>)); BOOST_TEST_TRAIT_TRUE((std::is_nothrow_copy_constructible>));