]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/ext/std/tuple/laws.cpp
1 // Copyright Louis Dionne 2013-2017
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)
5 #include <boost/hana/ext/std/tuple.hpp>
6 #include <boost/hana/tuple.hpp>
8 #include <laws/base.hpp>
9 #include <laws/comparable.hpp>
10 #include <laws/foldable.hpp>
11 #include <laws/iterable.hpp>
12 #include <laws/orderable.hpp>
13 #include <laws/sequence.hpp>
16 namespace hana
= boost::hana
;
17 using hana::test::ct_eq
;
18 using hana::test::ct_ord
;
22 auto eq_tuples
= hana::make_tuple(
24 , std::make_tuple(ct_eq
<0>{})
25 , std::make_tuple(ct_eq
<0>{}, ct_eq
<1>{})
26 , std::make_tuple(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{})
27 , std::make_tuple(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{}, ct_eq
<4>{})
30 auto ord_tuples
= hana::make_tuple(
32 , std::make_tuple(ct_ord
<0>{})
33 , std::make_tuple(ct_ord
<0>{}, ct_ord
<1>{})
34 , std::make_tuple(ct_ord
<0>{}, ct_ord
<1>{}, ct_ord
<2>{})
35 , std::make_tuple(ct_ord
<0>{}, ct_ord
<1>{}, ct_ord
<2>{}, ct_ord
<3>{}, ct_ord
<4>{})
38 hana::test::TestComparable
<hana::ext::std::tuple_tag
>{eq_tuples
};
39 hana::test::TestOrderable
<hana::ext::std::tuple_tag
>{ord_tuples
};
40 hana::test::TestFoldable
<hana::ext::std::tuple_tag
>{eq_tuples
};
41 hana::test::TestIterable
<hana::ext::std::tuple_tag
>{eq_tuples
};
42 hana::test::TestSequence
<hana::ext::std::tuple_tag
>{};