| 1 | // Copyright Louis Dionne 2013-2022 |
| 2 | // Distributed under the Boost Software License, Version 1.0. |
| 3 | // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) |
| 4 | |
| 5 | #include <boost/hana/ext/boost/tuple.hpp> |
| 6 | |
| 7 | #include <boost/hana/tuple.hpp> |
| 8 | |
| 9 | #include <laws/base.hpp> |
| 10 | #include <laws/foldable.hpp> |
| 11 | #include <laws/iterable.hpp> |
| 12 | |
| 13 | #include <boost/tuple/tuple.hpp> |
| 14 | namespace hana = boost::hana; |
| 15 | |
| 16 | |
| 17 | template <int i> |
| 18 | using eq = hana::test::ct_eq<i>; |
| 19 | |
| 20 | int main() { |
| 21 | ////////////////////////////////////////////////////////////////////////// |
| 22 | // Setup for the laws below |
| 23 | ////////////////////////////////////////////////////////////////////////// |
| 24 | auto eq_tuples = hana::make_tuple( |
| 25 | ::boost::make_tuple() |
| 26 | , ::boost::make_tuple(eq<0>{}) |
| 27 | , ::boost::make_tuple(eq<0>{}, eq<1>{}) |
| 28 | , ::boost::make_tuple(eq<0>{}, eq<1>{}, eq<2>{}) |
| 29 | ); |
| 30 | |
| 31 | ////////////////////////////////////////////////////////////////////////// |
| 32 | // Foldable, Iterable |
| 33 | ////////////////////////////////////////////////////////////////////////// |
| 34 | hana::test::TestFoldable<hana::ext::boost::tuple_tag>{eq_tuples}; |
| 35 | hana::test::TestIterable<hana::ext::boost::tuple_tag>{eq_tuples}; |
| 36 | } |
| 37 | |