Add initializer list support

This commit is contained in:
Peter Dimov
2017-05-31 04:19:40 +03:00
parent 8301228e22
commit 755bc60c2b
5 changed files with 67 additions and 7 deletions
+8
View File
@@ -128,6 +128,14 @@ int main()
v.emplace<3>();
BOOST_TEST_EQ( v.index(), 3 );
BOOST_TEST_EQ( get<3>(v), std::string() );
v.emplace<3>( { 'a', 'b' } );
BOOST_TEST_EQ( v.index(), 3 );
BOOST_TEST_EQ( get<3>(v), (std::string{ 'a', 'b'}) );
v.emplace<3>( { 'c', 'd' }, std::allocator<char>() );
BOOST_TEST_EQ( v.index(), 3 );
BOOST_TEST_EQ( get<3>(v), (std::string{ 'c', 'd'}) );
}
{