]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/ext/boost/tuple/orderable.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/boost/tuple.hpp>
7 #include <boost/hana/tuple.hpp>
9 #include <laws/comparable.hpp>
10 #include <laws/orderable.hpp>
12 #include <boost/tuple/tuple.hpp>
13 namespace hana
= boost::hana
;
17 using eq
= hana::test::ct_eq
<i
>;
20 using ord
= hana::test::ct_ord
<i
>;
23 //////////////////////////////////////////////////////////////////////////
24 // Setup for the laws below
25 //////////////////////////////////////////////////////////////////////////
26 auto eq_tuples
= hana::make_tuple(
28 , ::boost::make_tuple(eq
<0>{})
29 , ::boost::make_tuple(eq
<0>{}, eq
<1>{})
30 , ::boost::make_tuple(eq
<0>{}, eq
<1>{}, eq
<2>{})
31 , ::boost::make_tuple(eq
<0>{}, eq
<1>{}, eq
<2>{}, eq
<3>{}, eq
<4>{})
34 auto ord_tuples
= hana::make_tuple(
36 , ::boost::make_tuple(ord
<0>{})
37 , ::boost::make_tuple(ord
<0>{}, ord
<1>{})
38 , ::boost::make_tuple(ord
<0>{}, ord
<1>{}, ord
<2>{})
39 , ::boost::make_tuple(ord
<0>{}, ord
<1>{}, ord
<2>{}, ord
<3>{}, ord
<4>{})
42 //////////////////////////////////////////////////////////////////////////
43 // Comparable and Orderable
44 //////////////////////////////////////////////////////////////////////////
45 hana::test::TestComparable
<hana::ext::boost::tuple_tag
>{eq_tuples
};
46 hana::test::TestOrderable
<hana::ext::boost::tuple_tag
>{ord_tuples
};