• 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/equal.hpp>
7 #include <boost/hana/fill.hpp>
8 #include <boost/hana/tuple.hpp>
9 #include <boost/hana/type.hpp>
10 namespace hana = boost::hana;
11 
12 
13 struct x1;
14 struct x2;
15 struct x3;
16 struct z;
17 
main()18 int main() {
19     // fill a tuple_t with a hana::type
20     BOOST_HANA_CONSTANT_CHECK(hana::equal(
21         hana::fill(hana::tuple_t<>, hana::type_c<z>),
22         hana::tuple_t<>
23     ));
24     BOOST_HANA_CONSTANT_CHECK(hana::equal(
25         hana::fill(hana::tuple_t<x1>, hana::type_c<z>),
26         hana::tuple_t<z>
27     ));
28     BOOST_HANA_CONSTANT_CHECK(hana::equal(
29         hana::fill(hana::tuple_t<x1, x2>, hana::type_c<z>),
30         hana::tuple_t<z, z>
31     ));
32     BOOST_HANA_CONSTANT_CHECK(hana::equal(
33         hana::fill(hana::tuple_t<x1, x2, x3>, hana::type_c<z>),
34         hana::tuple_t<z, z, z>
35     ));
36 }
37