]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/ext/boost/tuple/searchable.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/bool.hpp>
8 #include <boost/hana/tuple.hpp>
10 #include <laws/base.hpp>
11 #include <laws/searchable.hpp>
13 #include <boost/tuple/tuple.hpp>
14 namespace hana
= boost::hana
;
18 using eq
= hana::test::ct_eq
<i
>;
21 //////////////////////////////////////////////////////////////////////////
22 // Setup for the laws below
23 //////////////////////////////////////////////////////////////////////////
24 auto eq_tuples
= hana::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>{})
31 auto eq_tuple_keys
= hana::make_tuple(
32 eq
<3>{}, eq
<5>{}, eq
<7>{}
35 //////////////////////////////////////////////////////////////////////////
37 //////////////////////////////////////////////////////////////////////////
39 hana::test::TestSearchable
<hana::ext::boost::tuple_tag
>{eq_tuples
, eq_tuple_keys
};
41 auto bools
= hana::make_tuple(
42 ::boost::make_tuple(hana::true_c
)
43 , ::boost::make_tuple(hana::false_c
)
44 , ::boost::make_tuple(hana::true_c
, hana::true_c
)
45 , ::boost::make_tuple(hana::true_c
, hana::false_c
)
46 , ::boost::make_tuple(hana::false_c
, hana::true_c
)
47 , ::boost::make_tuple(hana::false_c
, hana::false_c
)
49 hana::test::TestSearchable
<hana::ext::boost::tuple_tag
>{
51 hana::make_tuple(hana::true_c
, hana::false_c
)