]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/concept/struct/laws.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/concept/struct.hpp>
6 #include <boost/hana/integral_constant.hpp>
7 #include <boost/hana/tuple.hpp>
9 #include "minimal_struct.hpp"
10 #include <laws/base.hpp>
11 #include <laws/comparable.hpp>
12 #include <laws/foldable.hpp>
13 #include <laws/searchable.hpp>
14 namespace hana
= boost::hana
;
15 using hana::test::ct_eq
;
19 auto eq0
= hana::make_tuple(obj());
20 auto eq1
= hana::make_tuple(
21 obj(ct_eq
<0>{}), obj(ct_eq
<1>{}), obj(ct_eq
<2>{})
23 auto eq2
= hana::make_tuple(
24 obj(ct_eq
<0>{}, ct_eq
<0>{}),
25 obj(ct_eq
<0>{}, ct_eq
<1>{}),
26 obj(ct_eq
<1>{}, ct_eq
<0>{}),
27 obj(ct_eq
<1>{}, ct_eq
<1>{}),
28 obj(ct_eq
<0>{}, ct_eq
<2>{}),
29 obj(ct_eq
<2>{}, ct_eq
<3>{})
32 hana::test::TestComparable
<minimal_struct_tag
<0>>{eq0
};
33 hana::test::TestComparable
<minimal_struct_tag
<1>>{eq1
};
34 hana::test::TestComparable
<minimal_struct_tag
<2>>{eq2
};
36 hana::test::TestFoldable
<minimal_struct_tag
<0>>{eq0
};
37 hana::test::TestFoldable
<minimal_struct_tag
<1>>{eq1
};
38 hana::test::TestFoldable
<minimal_struct_tag
<2>>{eq2
};
40 hana::test::TestSearchable
<minimal_struct_tag
<0>>{eq0
, hana::make_tuple()};
41 hana::test::TestSearchable
<minimal_struct_tag
<1>>{eq1
, hana::make_tuple(hana::int_c
<0>)};
42 hana::test::TestSearchable
<minimal_struct_tag
<2>>{eq2
, hana::make_tuple(hana::int_c
<0>, hana::int_c
<1>)};