]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pfr/test/run/tuple_size.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / pfr / test / run / tuple_size.cpp
1 // Copyright (c) 2016-2022 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 #include <boost/pfr/core.hpp>
7
8 int main() {
9 struct nested { int i; char data[20]; };
10 struct foo { int i; char c; nested n; };
11 static_assert(boost::pfr::tuple_size_v<foo> == 3, "");
12
13 struct with_reference { int& i; char data; };
14 static_assert(boost::pfr::tuple_size_v<with_reference> == 2, "");
15
16 struct empty {};
17 static_assert(boost::pfr::tuple_size_v<empty> == 0, "");
18 }
19