• 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/integral_constant.hpp>
6 #include <boost/hana/range.hpp>
7 #include <boost/hana/tuple.hpp>
8 
9 #include <laws/comparable.hpp>
10 #include <laws/foldable.hpp>
11 #include <laws/iterable.hpp>
12 #include <laws/searchable.hpp>
13 
14 #include <type_traits>
15 namespace hana = boost::hana;
16 
17 
main()18 int main() {
19     auto ranges = hana::make_tuple(
20           hana::make_range(hana::int_c<0>, hana::int_c<0>)
21         , hana::make_range(hana::int_c<0>, hana::int_c<1>)
22         , hana::make_range(hana::int_c<0>, hana::int_c<2>)
23         , hana::make_range(hana::int_c<1>, hana::int_c<1>)
24         , hana::make_range(hana::int_c<1>, hana::int_c<2>)
25         , hana::make_range(hana::int_c<1>, hana::int_c<3>)
26         , hana::make_range(hana::int_c<50>, hana::int_c<60>)
27 
28         , hana::make_range(hana::int_c<50>, hana::long_c<60>)
29         , hana::make_range(hana::long_c<50>, hana::int_c<60>)
30     );
31 
32     auto integers = hana::tuple_c<int, 0, 1, 900>;
33 
34     hana::test::TestComparable<hana::range_tag>{ranges};
35     hana::test::TestFoldable<hana::range_tag>{ranges};
36     hana::test::TestIterable<hana::range_tag>{ranges};
37     hana::test::TestSearchable<hana::range_tag>{ranges, integers};
38 }
39