]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/leaf/test/result_implicit_conversion_test.cpp
1 // Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifdef BOOST_LEAF_TEST_SINGLE_HEADER
9 # include <boost/leaf/result.hpp>
12 #include "lightweight_test.hpp"
14 namespace leaf
= boost::leaf
;
42 BOOST_TEST_EQ(g().value().x
, 42);
44 leaf::result
<int> r1(42);
45 leaf::result
<A
> r2(std::move(r1
));
46 BOOST_TEST_EQ(r2
.value().x
, 42);
49 leaf::result
<int> r1(42);
52 BOOST_TEST_EQ(r2
.value().x
, 42);
54 return boost::report_errors();