Add tests for tuple_for_each and empty tuples

This commit is contained in:
Peter Dimov committed 2017-05-12 23:37:37 +03:00
1 parent 509ce8f95e
commit d97b21261f
3 files changed
+35 -3

No files matched your search

+14
View File
@@ -91,5 +91,19 @@ int main()
}
}
{
std::tuple<> tp;
BOOST_TEST_EQ( boost::tuple_for_each( tp, 11 ), 11 );
BOOST_TEST_EQ( boost::tuple_for_each( std::move( tp ), 12 ), 12 );
}
{
std::array<int, 0> tp;
BOOST_TEST_EQ( boost::tuple_for_each( tp, 11 ), 11 );
BOOST_TEST_EQ( boost::tuple_for_each( std::move( tp ), 12 ), 12 );
}
return boost::report_errors();
}