]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/optional/operator_arrow.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / optional / operator_arrow.cpp
CommitLineData
b32b8144 1// Copyright Louis Dionne 2013-2017
7c673cae
FG
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)
4
5#include <boost/hana/assert.hpp>
6#include <boost/hana/equal.hpp>
7#include <boost/hana/optional.hpp>
8
9#include <laws/base.hpp>
10namespace hana = boost::hana;
11using hana::test::ct_eq;
12
13
14struct object {
15 ct_eq<3> member;
16};
17
18int main() {
19 auto lvalue = hana::just(object{});
20 ct_eq<3>& ref = lvalue->member;
21 BOOST_HANA_CONSTANT_CHECK(hana::equal(
22 ref,
23 ct_eq<3>{}
24 ));
25
26 auto const const_lvalue = hana::just(object{});
27 ct_eq<3> const& const_ref = const_lvalue->member;
28 BOOST_HANA_CONSTANT_CHECK(hana::equal(
29 const_ref,
30 ct_eq<3>{}
31 ));
32
33 BOOST_HANA_CONSTANT_CHECK(hana::equal(
34 hana::just(object{})->member,
35 ct_eq<3>{}
36 ));
37}