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/equal.hpp>
7 #include <boost/hana/front.hpp>
8 #include <boost/hana/integral_constant.hpp>
9 #include <boost/hana/tuple.hpp>
10 #include <boost/hana/type.hpp>
11 namespace hana = boost::hana;
12 
13 
14 struct x0;
15 struct x1;
16 struct x2;
17 
main()18 int main() {
19     // tuple_t
20     BOOST_HANA_CONSTANT_CHECK(hana::equal(
21         hana::front(hana::tuple_t<x0>),
22         hana::type_c<x0>
23     ));
24     BOOST_HANA_CONSTANT_CHECK(hana::equal(
25         hana::front(hana::tuple_t<x0, x1>),
26         hana::type_c<x0>
27     ));
28     BOOST_HANA_CONSTANT_CHECK(hana::equal(
29         hana::front(hana::tuple_t<x0, x1, x2>),
30         hana::type_c<x0>
31     ));
32 
33     // tuple_c
34     BOOST_HANA_CONSTANT_CHECK(hana::equal(
35         hana::front(hana::tuple_c<int, 0>),
36         hana::int_c<0>
37     ));
38     BOOST_HANA_CONSTANT_CHECK(hana::equal(
39         hana::front(hana::tuple_c<int, 0, 1>),
40         hana::int_c<0>
41     ));
42     BOOST_HANA_CONSTANT_CHECK(hana::equal(
43         hana::front(hana::tuple_c<int, 0, 1, 2>),
44         hana::int_c<0>
45     ));
46 }
47