]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pfr/test/run/motivating_example.cpp
1 // Copyright (c) 2016-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)
8 #include "boost/pfr.hpp"
10 struct my_struct
{ // no ostream operator defined!
17 my_struct s
{100, 'H', 3.141593};
18 std::cout
<< "my_struct has "
19 << boost::pfr::tuple_size
<my_struct
>::value
// Outputs: 3
21 << boost::pfr::io(s
); // Outputs: {100, 'H', 3.141593}