]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/tuple/special.transform.cpp
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)
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/equal.hpp>
7 #include <boost/hana/transform.hpp>
8 #include <boost/hana/tuple.hpp>
9 #include <boost/hana/type.hpp>
10 namespace hana
= boost::hana
;
13 template <typename
...>
14 struct F
{ struct type
; };
22 // transform with tuple_t and a metafunction
23 BOOST_HANA_CONSTANT_CHECK(hana::equal(
24 hana::transform(hana::tuple_t
<>, hana::metafunction
<F
>),
28 BOOST_HANA_CONSTANT_CHECK(hana::equal(
29 hana::transform(hana::tuple_t
<x1
>, hana::metafunction
<F
>),
30 hana::tuple_t
<F
<x1
>::type
>
33 BOOST_HANA_CONSTANT_CHECK(hana::equal(
34 hana::transform(hana::tuple_t
<x1
, x2
>, hana::metafunction
<F
>),
35 hana::tuple_t
<F
<x1
>::type
, F
<x2
>::type
>
38 BOOST_HANA_CONSTANT_CHECK(hana::equal(
39 hana::transform(hana::tuple_t
<x1
, x2
, x3
>, hana::metafunction
<F
>),
40 hana::tuple_t
<F
<x1
>::type
, F
<x2
>::type
, F
<x3
>::type
>
43 BOOST_HANA_CONSTANT_CHECK(hana::equal(
44 hana::transform(hana::tuple_t
<x1
, x2
, x3
, x4
>, hana::metafunction
<F
>),
45 hana::tuple_t
<F
<x1
>::type
, F
<x2
>::type
, F
<x3
>::type
, F
<x4
>::type
>
48 BOOST_HANA_CONSTANT_CHECK(hana::equal(
49 hana::transform(hana::tuple_t
<x1
, x2
, x3
, x4
>, hana::template_
<F
>),
50 hana::tuple_t
<F
<x1
>, F
<x2
>, F
<x3
>, F
<x4
>>