2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-20 02:42:14 +00:00

Add any, all, none and {any,all,none}_of.

This commit is contained in:
Louis Dionne
2014-05-18 19:45:07 -04:00
parent e511cff396
commit 1fac38b7bc
2 changed files with 85 additions and 0 deletions

View File

@@ -53,9 +53,21 @@ void test_drop() {
BOOST_HANA_STATIC_ASSERT(drop(int_<2>, iterable(int_<0>, int_<1>)) == iterable());
}
void test_all_of() {
BOOST_HANA_STATIC_ASSERT(all_of(iterable()));
BOOST_HANA_STATIC_ASSERT(all_of(iterable(true_)));
BOOST_HANA_STATIC_ASSERT(all_of(iterable(true_, true_)));
BOOST_HANA_STATIC_ASSERT(!all_of(iterable(true_, true_, false_)));
BOOST_HANA_STATIC_ASSERT(!all_of(iterable(false_, true_, true_)));
BOOST_HANA_STATIC_ASSERT(all_of(iterable(true, true)));
BOOST_HANA_STATIC_ASSERT(!all_of(iterable(true, true, false)));
}
int main() {
test_at();
test_last();
test_length();
test_drop();
test_all_of();
}