]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/concept/struct/members.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/concept/struct.hpp>
7 #include <boost/hana/equal.hpp>
8 #include <boost/hana/members.hpp>
10 #include "minimal_struct.hpp"
11 #include <laws/base.hpp>
12 #include <support/seq.hpp>
13 namespace hana
= boost::hana
;
14 using hana::test::ct_eq
;
19 MoveOnly(MoveOnly
&&) = default;
20 MoveOnly(MoveOnly
const&) = delete;
21 MoveOnly
& operator=(MoveOnly
&&) = default;
22 MoveOnly
& operator=(MoveOnly
const&) = delete;
26 BOOST_HANA_CONSTANT_CHECK(hana::equal(
31 BOOST_HANA_CONSTANT_CHECK(hana::equal(
32 hana::members(obj(ct_eq
<0>{})),
36 BOOST_HANA_CONSTANT_CHECK(hana::equal(
37 hana::members(obj(ct_eq
<0>{}, ct_eq
<1>{})),
38 ::seq(ct_eq
<0>{}, ct_eq
<1>{})
41 BOOST_HANA_CONSTANT_CHECK(hana::equal(
42 hana::members(obj(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{})),
43 ::seq(ct_eq
<0>{}, ct_eq
<1>{}, ct_eq
<2>{})
46 // make sure it works with move only types
47 auto z1
= hana::members(obj(MoveOnly
{}));
48 auto z2
= hana::members(obj(MoveOnly
{}, MoveOnly
{}));