Add tests for tuple_for_each and empty tuples

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

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();
}