]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/ext/boost/mpl/vector/foldable.cpp
655b16f8268ba56454bd9fc164730d3c9fcd691f
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/ext/boost/mpl/vector.hpp>
7 #include <boost/hana/assert.hpp>
8 #include <boost/hana/equal.hpp>
9 #include <boost/hana/unpack.hpp>
10 #include <boost/hana/type.hpp>
12 #include <laws/base.hpp>
13 #include <laws/foldable.hpp>
15 #include <boost/mpl/vector.hpp>
16 namespace hana
= boost::hana
;
17 namespace mpl
= boost::mpl
;
20 struct t1
; struct t2
; struct t3
; struct t4
;
25 hana::test::_injection
<0> f
{};
26 BOOST_HANA_CONSTANT_CHECK(hana::equal(
27 hana::unpack(mpl::vector
<>{}, f
),
31 BOOST_HANA_CONSTANT_CHECK(hana::equal(
32 hana::unpack(mpl::vector
<t1
>{}, f
),
36 BOOST_HANA_CONSTANT_CHECK(hana::equal(
37 hana::unpack(mpl::vector
<t1
, t2
>{}, f
),
38 f(hana::type_c
<t1
>, hana::type_c
<t2
>)
41 BOOST_HANA_CONSTANT_CHECK(hana::equal(
42 hana::unpack(mpl::vector
<t1
, t2
, t3
>{}, f
),
43 f(hana::type_c
<t1
>, hana::type_c
<t2
>, hana::type_c
<t3
>)
48 auto vectors
= hana::make_tuple(
51 , mpl::vector
<t1
, t2
>{}
52 , mpl::vector
<t1
, t2
, t3
>{}
53 , mpl::vector
<t1
, t2
, t3
, t4
>{}
56 hana::test::TestFoldable
<hana::ext::boost::mpl::vector_tag
>{vectors
};