123456789101112131415161718192021222324252627282930313233343536 |
- // Copyright Louis Dionne 2013-2017
- // 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 <boost/hana/ext/boost/tuple.hpp>
- #include <boost/hana/tuple.hpp>
- #include <laws/base.hpp>
- #include <laws/foldable.hpp>
- #include <laws/iterable.hpp>
- #include <boost/tuple/tuple.hpp>
- namespace hana = boost::hana;
- template <int i>
- using eq = hana::test::ct_eq<i>;
- int main() {
- //////////////////////////////////////////////////////////////////////////
- // Setup for the laws below
- //////////////////////////////////////////////////////////////////////////
- auto eq_tuples = hana::make_tuple(
- ::boost::make_tuple()
- , ::boost::make_tuple(eq<0>{})
- , ::boost::make_tuple(eq<0>{}, eq<1>{})
- , ::boost::make_tuple(eq<0>{}, eq<1>{}, eq<2>{})
- );
- //////////////////////////////////////////////////////////////////////////
- // Foldable, Iterable
- //////////////////////////////////////////////////////////////////////////
- hana::test::TestFoldable<hana::ext::boost::tuple_tag>{eq_tuples};
- hana::test::TestIterable<hana::ext::boost::tuple_tag>{eq_tuples};
- }
|