Skip to content

Commit e610f9b

Browse files
committed
P3856R8 New reflection metafunction - is_structural_type (US NB comment 49)
1 parent 4d1fbb7 commit e610f9b

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

source/meta.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@
259259
template<class T> struct is_aggregate;
260260
template<class T> struct is_consteval_only;
261261

262+
template<class T> struct is_structural;
262263
template<class T> struct is_signed;
263264
template<class T> struct is_unsigned;
264265
template<class T> struct is_bounded_array;
@@ -512,6 +513,8 @@
512513
constexpr bool @\libglobal{is_aggregate_v}@ = is_aggregate<T>::value;
513514
template<class T>
514515
constexpr bool @\libglobal{is_consteval_only_v}@ = is_consteval_only<T>::value;
516+
template<class T>
517+
constexpr bool @\libglobal{is_structural_v}@ = is_structural<T>::value;
515518
template<class T>
516519
constexpr bool @\libglobal{is_signed_v}@ = is_signed<T>::value;
517520
template<class T>
@@ -1203,6 +1206,12 @@
12031206
\tcode{T} is consteval-only\iref{basic.types.general} &
12041207
\tcode{remove_all_extents_t<T>} shall be a complete type or \cv~\keyword{void}. \\ \rowsep
12051208

1209+
\indexlibraryglobal{is_structural}%
1210+
\tcode{template<class T>}\br
1211+
\tcode{struct is_structural;} &
1212+
\tcode{T} is a structural type\iref{temp.param} &
1213+
\tcode{remove_all_extents_t<T>} shall be a complete type or \cv~\keyword{void}. \\ \rowsep
1214+
12061215
\indexlibrary{\idxcode{is_signed}!class}%
12071216
\tcode{template<class T>}\br
12081217
\tcode{struct is_signed;} &
@@ -3152,6 +3161,7 @@
31523161
consteval bool is_final_type(info type);
31533162
consteval bool is_aggregate_type(info type);
31543163
consteval bool is_consteval_only_type(info type);
3164+
consteval bool is_structural_type(info type);
31553165
consteval bool is_signed_type(info type);
31563166
consteval bool is_unsigned_type(info type);
31573167
consteval bool is_bounded_array_type(info type);
@@ -6802,6 +6812,7 @@
68026812
consteval bool @\libglobal{is_final_type}@(info type);
68036813
consteval bool @\libglobal{is_aggregate_type}@(info type);
68046814
consteval bool @\libglobal{is_consteval_only_type}@(info type);
6815+
consteval bool @\libglobal{is_structural_type}@(info type);
68056816
consteval bool @\libglobal{is_signed_type}@(info type);
68066817
consteval bool @\libglobal{is_unsigned_type}@(info type);
68076818
consteval bool @\libglobal{is_bounded_array_type}@(info type);

source/support.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@
746746
#define @\defnlibxname{cpp_lib_is_null_pointer}@ 201309L // freestanding, also in \libheader{type_traits}
747747
#define @\defnlibxname{cpp_lib_is_pointer_interconvertible}@ 201907L // freestanding, also in \libheader{type_traits}
748748
#define @\defnlibxname{cpp_lib_is_scoped_enum}@ 202011L // freestanding, also in \libheader{type_traits}
749+
#define @\defnlibxname{cpp_lib_is_structural}@ 202603L // freestanding, also in \libheader{meta} and \libheader{type_traits}
749750
#define @\defnlibxname{cpp_lib_is_sufficiently_aligned}@ 202411L // freestanding, also in \libheader{memory}
750751
#define @\defnlibxname{cpp_lib_is_swappable}@ 201603L // freestanding, also in \libheader{type_traits}
751752
#define @\defnlibxname{cpp_lib_is_virtual_base_of}@ 202406L // freestanding, also in \libheader{type_traits}

0 commit comments

Comments
 (0)