]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/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/tuple.hpp>
7 #include <laws/base.hpp>
8 #include <laws/comparable.hpp>
9 #include <laws/foldable.hpp>
10 #include <laws/iterable.hpp>
11 #include <laws/orderable.hpp>
12 #include <laws/sequence.hpp>
13 namespace hana
= boost::hana
;
14 using hana::test::ct_eq
;
15 using hana::test::ct_ord
;
19 auto eq_tuples
= hana::make_tuple(
21 , hana::make_tuple(ct_eq
<0>{})
22 , hana::make_tuple(ct_eq
<0>{}, ct_eq
<1>{})
23 , hana::make_tuple(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{})
24 , hana::make_tuple(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{})
25 , hana::make_tuple(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{}, ct_eq
<4>{})
26 , hana::make_tuple(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{}, ct_eq
<4>{}, ct_eq
<5>{})
29 auto ord_tuples
= hana::make_tuple(
31 , hana::make_tuple(ct_ord
<0>{})
32 , hana::make_tuple(ct_ord
<0>{}, ct_ord
<1>{})
33 , hana::make_tuple(ct_ord
<0>{}, ct_ord
<1>{}, ct_ord
<2>{})
34 , hana::make_tuple(ct_ord
<0>{}, ct_ord
<1>{}, ct_ord
<2>{}, ct_ord
<3>{})
35 , hana::make_tuple(ct_ord
<0>{}, ct_ord
<1>{}, ct_ord
<2>{}, ct_ord
<3>{}, ct_ord
<4>{})
38 hana::test::TestComparable
<hana::tuple_tag
>{eq_tuples
};
39 hana::test::TestOrderable
<hana::tuple_tag
>{ord_tuples
};
40 hana::test::TestFoldable
<hana::tuple_tag
>{eq_tuples
};
41 hana::test::TestIterable
<hana::tuple_tag
>{eq_tuples
};
42 hana::test::TestSequence
<hana::tuple_tag
>{};