/* @copyright Louis Dionne 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #include #include #include #include using namespace boost::hana; template void test() { constexpr auto iterable = detail::minimal::iterable; auto check = [=](auto ...xs) { std::vector seen{}; for_each(iterable(xs...), [&](int x) { seen.push_back(x); }); assert(seen == std::vector{xs...}); }; check(); check(0); check(0, 1); check(0, 1, 2); check(0, 1, 2, 3); check(0, 1, 2, 3, 4); } int main() { test(); }