• 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/ext/std/pair.hpp>
6 #include <boost/hana/tuple.hpp>
7 
8 #include <laws/base.hpp>
9 #include <laws/comparable.hpp>
10 #include <laws/foldable.hpp>
11 #include <laws/orderable.hpp>
12 #include <laws/product.hpp>
13 
14 #include <utility>
15 namespace hana = boost::hana;
16 using hana::test::ct_eq;
17 using hana::test::ct_ord;
18 
19 
main()20 int main() {
21     auto eq_elems = hana::make_tuple(ct_eq<3>{}, ct_eq<4>{});
22 
23     auto eqs = hana::make_tuple(
24           std::make_pair(ct_eq<3>{}, ct_eq<3>{})
25         , std::make_pair(ct_eq<3>{}, ct_eq<4>{})
26         , std::make_pair(ct_eq<4>{}, ct_eq<3>{})
27         , std::make_pair(ct_eq<4>{}, ct_eq<4>{})
28     );
29 
30     auto ords = hana::make_tuple(
31           std::make_pair(ct_ord<3>{}, ct_ord<3>{})
32         , std::make_pair(ct_ord<3>{}, ct_ord<4>{})
33         , std::make_pair(ct_ord<4>{}, ct_ord<3>{})
34         , std::make_pair(ct_ord<4>{}, ct_ord<4>{})
35     );
36 
37     hana::test::TestComparable<hana::ext::std::pair_tag>{eqs};
38     hana::test::TestOrderable<hana::ext::std::pair_tag>{ords};
39     hana::test::TestFoldable<hana::ext::std::pair_tag>{eqs};
40     hana::test::TestProduct<hana::ext::std::pair_tag>{eq_elems};
41 }
42