• 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/assert.hpp>
6 #include <boost/hana/ext/std/integer_sequence.hpp>
7 #include <boost/hana/ext/std/integral_constant.hpp>
8 #include <boost/hana/tuple.hpp>
9 
10 #include <laws/comparable.hpp>
11 #include <laws/foldable.hpp>
12 #include <laws/iterable.hpp>
13 #include <laws/searchable.hpp>
14 
15 #include <type_traits>
16 #include <utility>
17 namespace hana = boost::hana;
18 
19 
20 auto sequences = hana::make_tuple(
21     std::integer_sequence<int>{},
22     std::integer_sequence<int, 2>{},
23     std::integer_sequence<int, 3>{},
24     std::integer_sequence<int, 3, 4>{},
25     std::integer_sequence<int, 3, 4, 5>{}
26 );
27 
28 auto keys = hana::make_tuple(
29     std::integral_constant<int, 3>{}, std::integral_constant<long long, 4>{}
30 );
31 
main()32 int main() {
33     hana::test::TestComparable<hana::ext::std::integer_sequence_tag>{sequences};
34     hana::test::TestFoldable<hana::ext::std::integer_sequence_tag>{sequences};
35     hana::test::TestIterable<hana::ext::std::integer_sequence_tag>{sequences};
36     hana::test::TestSearchable<hana::ext::std::integer_sequence_tag>{sequences, keys};
37 }
38