]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/pfr/test/compile-fail/private_fields.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / pfr / test / compile-fail / private_fields.cpp
CommitLineData
1e59de90 1// Copyright (c) 2018-2022 Antony Polukhin
20effc67
TL
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/tuple_size.hpp>
7
8#ifdef __clang__
9# pragma clang diagnostic ignored "-Wunused-private-field"
10#endif
11
12
13class test_with_private {
14private:
15 int i;
16 char c;
17
18public:
19 double d;
20 float f;
21};
22
23int main() {
24#ifndef __cpp_lib_is_aggregate
25# error No known way to detect private fields.
26#endif
27
28 return boost::pfr::tuple_size<test_with_private>::value;
29}
30