]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/map/is_subset.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/is_subset.hpp>
7 #include <boost/hana/map.hpp>
8 #include <boost/hana/not.hpp>
10 #include <laws/base.hpp>
11 #include <support/minimal_product.hpp>
12 namespace hana
= boost::hana
;
16 auto key() { return hana::test::ct_eq
<i
>{}; }
19 auto val() { return hana::test::ct_eq
<-i
>{}; }
21 template <int i
, int j
>
22 auto p() { return ::minimal_product(key
<i
>(), val
<j
>()); }
25 BOOST_HANA_CONSTANT_CHECK(hana::is_subset(
29 BOOST_HANA_CONSTANT_CHECK(hana::is_subset(
31 hana::make_map(p
<1, 1>())
33 BOOST_HANA_CONSTANT_CHECK(hana::is_subset(
35 hana::make_map(p
<1, 1>(), p
<2, 2>())
38 BOOST_HANA_CONSTANT_CHECK(hana::is_subset(
39 hana::make_map(p
<1, 1>()),
40 hana::make_map(p
<1, 1>(), p
<2, 2>())
43 BOOST_HANA_CONSTANT_CHECK(hana::is_subset(
44 hana::make_map(p
<2, 2>(), p
<1, 1>()),
45 hana::make_map(p
<1, 1>(), p
<2, 2>())
47 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_subset(
48 hana::make_map(p
<3, 3>(), p
<1, 1>()),
49 hana::make_map(p
<1, 1>(), p
<2, 2>())