Skip to content

Commit ca635f1

Browse files
authored
Merge 2026-03 LWG Motion 34
P3856R8 New reflection metafunction - is_structural_type (US NB comment 49)
2 parents 5e7bfcd + 33d8791 commit ca635f1

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

source/meta.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
template<class T> struct is_final;
243243
template<class T> struct is_aggregate;
244244

245+
template<class T> struct is_structural;
245246
template<class T> struct is_signed;
246247
template<class T> struct is_unsigned;
247248
template<class T> struct is_bounded_array;
@@ -493,6 +494,8 @@
493494
constexpr bool @\libglobal{is_final_v}@ = is_final<T>::value;
494495
template<class T>
495496
constexpr bool @\libglobal{is_aggregate_v}@ = is_aggregate<T>::value;
497+
template<class T>
498+
constexpr bool @\libglobal{is_structural_v}@ = is_structural<T>::value;
496499
template<class T>
497500
constexpr bool @\libglobal{is_signed_v}@ = is_signed<T>::value;
498501
template<class T>
@@ -932,6 +935,12 @@
932935
\tcode{T} is an aggregate type\iref{dcl.init.aggr} &
933936
\tcode{T} shall be an array type, a complete type, or \cv~\keyword{void}. \\ \rowsep
934937

938+
\indexlibraryglobal{is_structural}%
939+
\tcode{template<class T>}\br
940+
\tcode{struct is_structural;} &
941+
\tcode{T} is a structural type\iref{temp.param} &
942+
\tcode{remove_all_extents_t<T>} shall be a complete type or \cv~\keyword{void}. \\ \rowsep
943+
935944
\indexlibrary{\idxcode{is_signed}!class}%
936945
\tcode{template<class T>}\br
937946
\tcode{struct is_signed;} &
@@ -2901,6 +2910,7 @@
29012910
consteval bool is_abstract_type(info type);
29022911
consteval bool is_final_type(info type);
29032912
consteval bool is_aggregate_type(info type);
2913+
consteval bool is_structural_type(info type);
29042914
consteval bool is_signed_type(info type);
29052915
consteval bool is_unsigned_type(info type);
29062916
consteval bool is_bounded_array_type(info type);
@@ -6732,6 +6742,7 @@
67326742
consteval bool @\libglobal{is_abstract_type}@(info type);
67336743
consteval bool @\libglobal{is_final_type}@(info type);
67346744
consteval bool @\libglobal{is_aggregate_type}@(info type);
6745+
consteval bool @\libglobal{is_structural_type}@(info type);
67356746
consteval bool @\libglobal{is_signed_type}@(info type);
67366747
consteval bool @\libglobal{is_unsigned_type}@(info type);
67376748
consteval bool @\libglobal{is_bounded_array_type}@(info type);

source/support.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@
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
750+
// freestanding, also in \libheader{meta} and \libheader{type_traits}
749751
#define @\defnlibxname{cpp_lib_is_sufficiently_aligned}@ 202411L // freestanding, also in \libheader{memory}
750752
#define @\defnlibxname{cpp_lib_is_swappable}@ 201603L // freestanding, also in \libheader{type_traits}
751753
#define @\defnlibxname{cpp_lib_is_virtual_base_of}@ 202406L // freestanding, also in \libheader{type_traits}

0 commit comments

Comments
 (0)