GCC 4.4.7: boost::in_place & Assignment

Assigning a boost::in_place_factory to a boost::optional templated on a
type which was trivially copyable failed to compile under GCC 4.4.7.
This commit is contained in:
Robert Leahy
2019-12-22 16:13:53 -05:00
parent d07ae78901
commit 9581804efa
2 changed files with 8 additions and 1 deletions

View File

@ -63,6 +63,9 @@ void test_ctor()
BOOST_TEST(og1_ == og1);
BOOST_TEST(og1_ != og2);
BOOST_TEST(og1_ != og0);
boost::optional<unsigned int> o( boost::in_place(5) );
BOOST_TEST(o && (*o == 5));
#endif
}
@ -92,6 +95,10 @@ void test_assign()
BOOST_TEST(og1_ == og1);
BOOST_TEST(og1_ != og2);
BOOST_TEST(og1_ != og0);
boost::optional<unsigned int> o;
o = boost::in_place(5);
BOOST_TEST(o && (*o == 5));
#endif
#endif
}