• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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)
4 
5 #include <boost/hana/bool.hpp>
6 #include <boost/hana/tuple.hpp>
7 
8 #include <laws/base.hpp>
9 #include <laws/searchable.hpp>
10 namespace hana = boost::hana;
11 using hana::test::ct_eq;
12 
13 
main()14 int main() {
15     auto eq_tuples = hana::make_tuple(
16           hana::make_tuple()
17         , hana::make_tuple(ct_eq<0>{})
18         , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{})
19         , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{})
20         , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{})
21         , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{}, ct_eq<4>{})
22     );
23     hana::test::TestSearchable<hana::tuple_tag>{
24         eq_tuples,
25         hana::make_tuple(ct_eq<3>{}, ct_eq<5>{})
26     };
27 
28     auto bool_tuples = hana::make_tuple(
29           hana::make_tuple(hana::true_c)
30         , hana::make_tuple(hana::false_c)
31         , hana::make_tuple(hana::true_c, hana::true_c)
32         , hana::make_tuple(hana::true_c, hana::false_c)
33         , hana::make_tuple(hana::false_c, hana::true_c)
34         , hana::make_tuple(hana::false_c, hana::false_c)
35     );
36     hana::test::TestSearchable<hana::tuple_tag>{
37         bool_tuples,
38         hana::make_tuple(hana::true_c, hana::false_c)
39     };
40 }
41