Added emplace(void) for older compilers

This commit is contained in:
Andrzej Krzemienski committed 2015-05-15 18:10:19 +02:00
1 parent 339202a8fb
commit 8ca74951b0
7 files changed
+65 -33

No files matched your search

+6 -1
View File
@@ -145,11 +145,16 @@ void test_clear_on_throw()
void test_no_assignment_on_emplacement()
{
optional<const std::string> os;
optional<const std::string> os, ot;
BOOST_TEST(!os);
os.emplace("wow");
BOOST_TEST(os);
BOOST_TEST_EQ(*os, "wow");
BOOST_TEST(!ot);
ot.emplace();
BOOST_TEST(ot);
BOOST_TEST_EQ(*ot, "");
}
int main()