]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright Louis Dionne 2013-2016 |
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/ap.hpp> | |
6 | #include <boost/hana/equal.hpp> | |
7 | #include <boost/hana/ext/std/tuple.hpp> | |
8 | #include <boost/hana/functional/flip.hpp> | |
9 | #include <boost/hana/lift.hpp> | |
10 | #include <boost/hana/pair.hpp> | |
11 | #include <boost/hana/tuple.hpp> | |
12 | ||
13 | #include <tuple> | |
14 | namespace hana = boost::hana; | |
15 | ||
16 | ||
17 | static_assert(hana::lift<hana::tuple_tag>('x') == hana::make_tuple('x'), ""); | |
18 | static_assert(hana::equal(hana::lift<hana::ext::std::tuple_tag>('x'), std::make_tuple('x')), ""); | |
19 | ||
20 | constexpr auto f = hana::make_pair; | |
21 | constexpr auto g = hana::flip(hana::make_pair); | |
22 | static_assert( | |
23 | hana::ap(hana::make_tuple(f, g), hana::make_tuple(1, 2, 3), hana::make_tuple('a', 'b')) | |
24 | == | |
25 | hana::make_tuple( | |
26 | f(1, 'a'), f(1, 'b'), f(2, 'a'), f(2, 'b'), f(3, 'a'), f(3, 'b'), | |
27 | g(1, 'a'), g(1, 'b'), g(2, 'a'), g(2, 'b'), g(3, 'a'), g(3, 'b') | |
28 | ) | |
29 | , ""); | |
30 | ||
31 | int main() { } |