]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pfr/test/run/tuple_size.cpp
1 // Copyright (c) 2016-2022 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 #include <boost/pfr/core.hpp>
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, "");
13 struct with_reference
{ int& i
; char data
; };
14 static_assert(boost::pfr::tuple_size_v
<with_reference
> == 2, "");
17 static_assert(boost::pfr::tuple_size_v
<empty
> == 0, "");