]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/ext/std/tuple/laws.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/bool.hpp>
6 #include <boost/hana/ext/std/tuple.hpp>
7 #include <boost/hana/tuple.hpp>
9 #include <laws/base.hpp>
10 #include <laws/searchable.hpp>
13 namespace hana
= boost::hana
;
14 using hana::test::ct_eq
;
18 auto tuples
= hana::make_tuple(
20 , std::make_tuple(ct_eq
<0>{})
21 , std::make_tuple(ct_eq
<0>{}, ct_eq
<1>{})
22 , std::make_tuple(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{})
24 auto keys
= hana::make_tuple(ct_eq
<3>{}, ct_eq
<5>{}, ct_eq
<7>{});
26 auto bool_tuples
= hana::make_tuple(
27 std::make_tuple(hana::true_c
)
28 , std::make_tuple(hana::false_c
)
29 , std::make_tuple(hana::true_c
, hana::true_c
)
30 , std::make_tuple(hana::true_c
, hana::false_c
)
31 , std::make_tuple(hana::false_c
, hana::true_c
)
32 , std::make_tuple(hana::false_c
, hana::false_c
)
34 auto bool_keys
= hana::make_tuple(hana::true_c
, hana::false_c
);
36 hana::test::TestSearchable
<hana::ext::std::tuple_tag
>{tuples
, keys
};
37 hana::test::TestSearchable
<hana::ext::std::tuple_tag
>{bool_tuples
, bool_keys
};