]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/experimental/view/transformed/unpack.cpp
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)
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/equal.hpp>
7 #include <boost/hana/experimental/view.hpp>
8 #include <boost/hana/unpack.hpp>
10 #include <laws/base.hpp>
11 #include <support/seq.hpp>
12 namespace hana
= boost::hana
;
13 using hana::test::ct_eq
;
17 auto f
= hana::test::_injection
<0>{};
18 auto g
= hana::test::_injection
<1>{};
19 auto check
= [=](auto ...x
) {
20 auto storage
= ::seq(x
...);
21 auto transformed
= hana::experimental::transformed(storage
, f
);
23 BOOST_HANA_CONSTANT_CHECK(hana::equal(
24 hana::unpack(transformed
, g
),
31 check(ct_eq
<0>{}, ct_eq
<1>{});
32 check(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{});
33 check(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{});