This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
is_consteval_only preconditions are too weakSection: 21.3.6.4 [meta.unary.prop] Status: New Submitter: Tim Song Opened: 2026-03-05 Last modified: 2026-03-06
Priority: Not Prioritized
View other active issues in [meta.unary.prop].
View all other issues in [meta.unary.prop].
View all issues with New status.
Discussion:
Addresses US 81-149.
The precondition for is_consteval_only is insufficient. A definitive false answer requires every type that T is compounded from to be complete or cv void.
Proposed resolution:
This wording is relative to N5032.
Combine 21.3.6.4 [meta.unary.prop] p4-5 into one paragraph with a bullet list, then add a new bullet, as indicated:
-4- For the purpose of defining the templates in this subclause
,:
(4.1) — a function call expression
declval<T>()for any typeTis considered to be a trivial (D.13 [depr.meta.types], 11.4.4 [special]) function call that is not an odr-use (6.3 [basic.def.odr]) ofdeclvalin the context of the corresponding definition notwithstanding the restrictions of 22.2.6 [declval].(4.2) —
-5- For the purpose of defining the templates in this subclause,letVAL<T>for some typeTbe an expression defined as follows:
(
5.14.2.1) — […](
5.24.2.2) — […](4.3) — let
C(T)be the set of types defined as follows:
(4.3.1) — if
Tis the type "array ofU", "pointer toU", or "reference toU", thenC(T)isC(U);(4.2.2) — otherwise, if
Tis the type "pointer to member of classXof typeU", thenC(T)is the union ofC(X)andC(U);(4.2.3) — otherwise, if
Tis the type "noexceptopt function of parameter-type-list cv-qualifier-seqopt ref-qualifieropt returningU", thenC(T)is the union ofC(U)andC(X)for each typeXin the parameter-type-list;(4.2.4) — otherwise, if
Tis a complete class type, thenC(T)is the union ofC(U), whereUis the type of each (possibly indirect) non-static data member ofT;(4.2.5) — otherwise,
C(T)is the set containing the single elementremove_cv_t<T>.
Modify [tab:meta.unary.prop], Table 54 — Type property predicates as indicated:
Template Condition Preconditions … … … template<class T> struct is_consteval_only;T is consteval-only (6.9.1 [basic.types.general]) Ifremove_all_extents_t<T>shall be a complete type or _cv_void.C(T)does not containstd::meta::info, then it shall not contain an incomplete class type.… … …