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/core/make.hpp>
7 #include <boost/hana/equal.hpp>
8 #include <boost/hana/integral_constant.hpp>
9 #include <boost/hana/range.hpp>
10 namespace hana = boost::hana;
11
12
main()13 int main() {
14 using T = int;
15 BOOST_HANA_CONSTANT_CHECK(hana::equal(
16 hana::range_c<T, 0, 0>,
17 hana::make_range(hana::integral_c<T, 0>, hana::integral_c<T, 0>)
18 ));
19 BOOST_HANA_CONSTANT_CHECK(hana::equal(
20 hana::range_c<T, 0, 1>,
21 hana::make_range(hana::integral_c<T, 0>, hana::integral_c<T, 1>)
22 ));
23 BOOST_HANA_CONSTANT_CHECK(hana::equal(
24 hana::range_c<T, 0, 2>,
25 hana::make_range(hana::integral_c<T, 0>, hana::integral_c<T, 2>)
26 ));
27
28 BOOST_HANA_CONSTANT_CHECK(hana::equal(
29 hana::range_c<T, 1, 1>,
30 hana::make_range(hana::integral_c<T, 1>, hana::integral_c<T, 1>)
31 ));
32 BOOST_HANA_CONSTANT_CHECK(hana::equal(
33 hana::range_c<T, 1, 2>,
34 hana::make_range(hana::integral_c<T, 1>, hana::integral_c<T, 2>)
35 ));
36 BOOST_HANA_CONSTANT_CHECK(hana::equal(
37 hana::range_c<T, 1, 3>,
38 hana::make_range(hana::integral_c<T, 1>, hana::integral_c<T, 3>)
39 ));
40 }
41