]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/functional/lockstep.cpp
81696f9cc9140afec4eb9fbb998cac5520a52e1f
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/functional/lockstep.hpp>
9 #include <laws/base.hpp>
10 namespace hana
= boost::hana
;
11 using hana::test::ct_eq
;
15 hana::test::_injection
<0> f
{};
16 hana::test::_injection
<1> g
{};
17 hana::test::_injection
<2> h
{};
18 hana::test::_injection
<3> i
{};
20 BOOST_HANA_CONSTANT_CHECK(hana::equal(
21 hana::lockstep(f
)()(),
24 BOOST_HANA_CONSTANT_CHECK(hana::equal(
25 hana::lockstep(f
)(g
)(ct_eq
<1>{}),
28 BOOST_HANA_CONSTANT_CHECK(hana::equal(
29 hana::lockstep(f
)(g
, h
)(ct_eq
<1>{}, ct_eq
<2>{}),
30 f(g(ct_eq
<1>{}), h(ct_eq
<2>{}))
32 BOOST_HANA_CONSTANT_CHECK(hana::equal(
33 hana::lockstep(f
)(g
, h
, i
)(ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{}),
34 f(g(ct_eq
<1>{}), h(ct_eq
<2>{}), i(ct_eq
<3>{}))