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

+11 -3
View File
@@ -31,9 +31,17 @@ struct assert_is_integral
int main()
{
constexpr std::tuple<int, short, char> tp{ 1, 2, 3 };
constexpr auto r = boost::tuple_for_each( tp, assert_is_integral() );
(void)r;
{
constexpr std::tuple<int, short, char> tp{ 1, 2, 3 };
constexpr auto r = boost::tuple_for_each( tp, assert_is_integral() );
(void)r;
}
{
constexpr std::tuple<> tp;
constexpr auto r = boost::tuple_for_each( tp, 11 );
static_assert( r == 11, "r == 11" );
}
}
#endif