Make empty_value<T> trivial if T is trivial

This commit is contained in:
Glen Fernandes
2018-08-26 02:08:51 -04:00
parent a05906fd44
commit 2eaba7d6d1
2 changed files with 15 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ void test_bool()
{
const boost::empty_value<bool> v1(boost::empty_init_t(), true);
BOOST_TEST(v1.get());
boost::empty_value<bool> v2;
boost::empty_value<bool> v2 = boost::empty_init_t();
BOOST_TEST(!v2.get());
v2 = v1;
BOOST_TEST(v2.get());