]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pfr/test/run/non_dc_non_cop_but_mov.cpp
1 // Copyright (c) 2018-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)
7 #include <boost/pfr/tuple_size.hpp>
15 X
& operator=(X
&&) = default;
16 X
& operator=(const X
&) = delete;
18 struct S
{ X x0
; X x1
; int x2
; X x3
; };
20 static_assert(!std::is_default_constructible
<X
>::value
, "");
21 static_assert(!std::is_default_constructible
<S
>::value
, "");
24 static_assert(boost::pfr::tuple_size_v
<S
> == 4, "");
26 struct S5_0
{ int x0
; int x1
; int x2
; int x3
; X x4
; };
27 static_assert(boost::pfr::tuple_size_v
<S5_0
> == 5, "");
29 struct S5_1
{ X x0
; int x1
; int x2
; int x3
; int x4
; };
30 static_assert(boost::pfr::tuple_size_v
<S5_1
> == 5, "");
32 struct S5_2
{ int x0
; int x1
; X x2
; int x3
; int x4
; };
33 static_assert(boost::pfr::tuple_size_v
<S5_2
> == 5, "");
35 struct S5_3
{ int x0
; int x1
; X x2
; int x3
; X x4
; };
36 static_assert(boost::pfr::tuple_size_v
<S5_3
> == 5, "");
38 struct S5_4
{ X x0
; X x1
; X x2
; X x3
; X x4
; };
39 static_assert(boost::pfr::tuple_size_v
<S5_4
> == 5, "");
41 struct S6
{ X x0
; X x1
; X x2
; X x3
; X x4
; X x5
;};
42 static_assert(boost::pfr::tuple_size_v
<S6
> == 6, "");