]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/pfr/test/run/issue33.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / pfr / test / run / issue33.cpp
CommitLineData
20effc67
TL
1// Copyright (c) 2018-2020 Antony Polukhin
2//
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)
5
6// Test case for https://github.com/apolukhin/magic_get/issues/33
7
8#include <iostream>
9#include <vector>
10#include <boost/pfr.hpp>
11#include <boost/core/lightweight_test.hpp>
12
13struct TestStruct {
14 std::vector<std::unique_ptr<int>> vec;
15};
16
17int main() {
18 TestStruct temp;
19 temp.vec.emplace_back();
20
21 boost::pfr::for_each_field(temp, [](const auto& value) {
22 BOOST_TEST_EQ(value.size(), 1);
23 });
24
25 return boost::report_errors();
26}