]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/integral_constant/logical.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/eval_if.hpp>
8 #include <boost/hana/integral_constant.hpp>
9 #include <boost/hana/not.hpp>
10 #include <boost/hana/tuple.hpp>
12 #include <laws/base.hpp>
13 #include <laws/logical.hpp>
14 namespace hana
= boost::hana
;
20 auto t
= [](auto) { return hana::test::ct_eq
<3>{}; };
21 auto e
= [](auto) { return hana::test::ct_eq
<4>{}; };
23 BOOST_HANA_CONSTANT_CHECK(hana::equal(
24 hana::eval_if(hana::true_c
, t
, e
),
25 hana::test::ct_eq
<3>{}
28 BOOST_HANA_CONSTANT_CHECK(hana::equal(
29 hana::eval_if(hana::false_c
, t
, e
),
30 hana::test::ct_eq
<4>{}
36 BOOST_HANA_CONSTANT_CHECK(hana::equal(
37 hana::not_(hana::true_c
),
41 BOOST_HANA_CONSTANT_CHECK(hana::equal(
42 hana::not_(hana::false_c
),
48 hana::test::TestLogical
<hana::integral_constant_tag
<int>>{hana::make_tuple(
49 hana::int_c
<-2>, hana::int_c
<0>, hana::int_c
<1>, hana::int_c
<3>
52 hana::test::TestLogical
<hana::integral_constant_tag
<bool>>{hana::make_tuple(
53 hana::false_c
, hana::true_c