]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pfr/test/run/issue30.cpp
1 // Copyright (c) 2018-2020 Antony Polukhin
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 // Test case for https://github.com/apolukhin/magic_get/issues/30
9 #include <boost/pfr.hpp>
10 #include <boost/core/lightweight_test.hpp>
13 std::unique_ptr
<int> data
;
17 std::unique_ptr
<int> data41
= std::make_unique
<int>(41);
18 std::unique_ptr
<int> data42
= std::make_unique
<int>(42);
23 auto& ptr
= boost::pfr::get
<0>(message
);
24 BOOST_TEST(ptr
== nullptr);
27 auto& ptr2
= boost::pfr::get
<1>(message2
);
28 BOOST_TEST_EQ(*ptr2
, 42);
30 return boost::report_errors();