P3856R4 — New reflection metafunction - is_structural_type (US NB comment 49) (7 items) LEWG/LWG
Jagrut Dave, Alisdair Meredith
This paper proposes adding a new reflection metafunction is_structural_type(info) to the header and a corresponding type trait is_structural to , allowing users to query whether a type is a structural type as defined by [temp.param]. Currently, the standard mandates structural types in several library contexts but provides no user-accessible mechanism to check this property. The paper provides a proof-of-concept implementation using P2996 reflection metafunctions and includes full library wording for both the metafunction and type trait.

References — Anthropic Citations API

[1]
"requires is_structural_type_v" vs. (wording) "constexpr bool is_structural_v = is_structural::value;"
[2]
"None C/C++ template> consteval bool is_constructible_type(info type, R&& type_args); ... Add a new metafunction is_structural_type to 21.4.17..."
[2]
"None C/C++ template> consteval bool is_constructible_type(info type, R&& type_args); ... Add a new metafunction is_structural_type to 21.4.17..."
[3]
"[P2996R13] Barry Revzin, Wyatt Childers, Peter Dimov, Andrew Sutton, Faisal Vali, Daveed Vandevoorde, Dan Katz. 2025-01-13. Reflection for C++26. https://wg21.link/p2996r9"
[4]
"3.1.2 Proof of concept implementation" ... "3.3 Observations from the sample implementation"
[5]
"None C/C++ template> consteval bool is_constructible_type(info type, R&& type_args); ... Add a new metafunction is_structural_type to 21.4.17..."
[5]
"None C/C++ template> consteval bool is_constructible_type(info type, R&& type_args); ... Add a new metafunction is_structural_type to 21.4.17..."
Summary: P3856R4 proposes adding a new type trait is_structural to the header and a corresponding is_structural_type reflection metafunction, enabling compile-time queries for whether a type satisfies the structural type requirements needed for use as a non-type template parameter. Five defects were found spanning naming inconsistencies, a missing precondition, a misspelling, a broken section numbering, and an incorrect bibliography URL.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.