]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/functional/reverse_partial.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/functional/reverse_partial.hpp>
9 #include <laws/base.hpp>
10 namespace hana
= boost::hana
;
11 using hana::test::ct_eq
;
15 constexpr auto rp
= hana::reverse_partial
;
16 hana::test::_injection
<0> f
{};
18 BOOST_HANA_CONSTANT_CHECK(hana::equal(
22 BOOST_HANA_CONSTANT_CHECK(hana::equal(
26 BOOST_HANA_CONSTANT_CHECK(hana::equal(
27 rp(f
)(ct_eq
<1>{}, ct_eq
<2>{}),
28 f(ct_eq
<1>{}, ct_eq
<2>{})
30 BOOST_HANA_CONSTANT_CHECK(hana::equal(
31 rp(f
)(ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{}),
32 f(ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{})
35 BOOST_HANA_CONSTANT_CHECK(hana::equal(
39 BOOST_HANA_CONSTANT_CHECK(hana::equal(
40 rp(f
, ct_eq
<1>{})(ct_eq
<2>{}),
41 f(ct_eq
<2>{}, ct_eq
<1>{})
43 BOOST_HANA_CONSTANT_CHECK(hana::equal(
44 rp(f
, ct_eq
<1>{})(ct_eq
<2>{}, ct_eq
<3>{}),
45 f(ct_eq
<2>{}, ct_eq
<3>{}, ct_eq
<1>{})
48 BOOST_HANA_CONSTANT_CHECK(hana::equal(
49 rp(f
, ct_eq
<1>{}, ct_eq
<2>{})(),
50 f(ct_eq
<1>{}, ct_eq
<2>{})
52 BOOST_HANA_CONSTANT_CHECK(hana::equal(
53 rp(f
, ct_eq
<1>{}, ct_eq
<2>{})(ct_eq
<3>{}),
54 f(ct_eq
<3>{}, ct_eq
<1>{}, ct_eq
<2>{})
56 BOOST_HANA_CONSTANT_CHECK(hana::equal(
57 rp(f
, ct_eq
<1>{}, ct_eq
<2>{})(ct_eq
<3>{}, ct_eq
<4>{}),
58 f(ct_eq
<3>{}, ct_eq
<4>{}, ct_eq
<1>{}, ct_eq
<2>{})
61 BOOST_HANA_CONSTANT_CHECK(hana::equal(
62 rp(f
, ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{})(),
63 f(ct_eq
<1>{}, ct_eq
<2>{}, ct_eq
<3>{})