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/drop_front_exactly.hpp>
8 #include <boost/hana/equal.hpp>
9 #include <boost/hana/integral_constant.hpp>
10 #include <boost/hana/range.hpp>
11 namespace hana = boost::hana;
12
13
main()14 int main() {
15 BOOST_HANA_CONSTANT_CHECK(hana::equal(
16 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<0>), hana::int_c<0>),
17 hana::make_range(hana::int_c<0>, hana::int_c<0>)
18 ));
19
20 BOOST_HANA_CONSTANT_CHECK(hana::equal(
21 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<1>), hana::int_c<0>),
22 hana::make_range(hana::int_c<0>, hana::int_c<1>)
23 ));
24 BOOST_HANA_CONSTANT_CHECK(hana::equal(
25 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<1>), hana::int_c<1>),
26 hana::make_range(hana::int_c<1>, hana::int_c<1>)
27 ));
28
29 BOOST_HANA_CONSTANT_CHECK(hana::equal(
30 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<2>), hana::int_c<0>),
31 hana::make_range(hana::int_c<0>, hana::int_c<2>)
32 ));
33 BOOST_HANA_CONSTANT_CHECK(hana::equal(
34 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<2>), hana::int_c<1>),
35 hana::make_range(hana::int_c<1>, hana::int_c<2>)
36 ));
37 BOOST_HANA_CONSTANT_CHECK(hana::equal(
38 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<2>), hana::int_c<2>),
39 hana::make_range(hana::int_c<2>, hana::int_c<2>)
40 ));
41
42 BOOST_HANA_CONSTANT_CHECK(hana::equal(
43 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<3>), hana::int_c<0>),
44 hana::make_range(hana::int_c<0>, hana::int_c<3>)
45 ));
46 BOOST_HANA_CONSTANT_CHECK(hana::equal(
47 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<3>), hana::int_c<1>),
48 hana::make_range(hana::int_c<1>, hana::int_c<3>)
49 ));
50 BOOST_HANA_CONSTANT_CHECK(hana::equal(
51 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<3>), hana::int_c<2>),
52 hana::make_range(hana::int_c<2>, hana::int_c<3>)
53 ));
54 BOOST_HANA_CONSTANT_CHECK(hana::equal(
55 hana::drop_front_exactly(hana::make_range(hana::int_c<0>, hana::int_c<3>), hana::int_c<3>),
56 hana::make_range(hana::int_c<3>, hana::int_c<3>)
57 ));
58
59 BOOST_HANA_CONSTANT_CHECK(hana::equal(
60 hana::drop_front_exactly(hana::make_range(hana::int_c<20>, hana::int_c<50>), hana::int_c<10>),
61 hana::make_range(hana::int_c<30>, hana::int_c<50>)
62 ));
63 }
64