This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Ready status.

4534. is_consteval_only preconditions are too weak

Section: 21.3.6.4 [meta.unary.prop] Status: Ready 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 Ready 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.

[2026-03-06 LWG telecon; move to Ready]

Proposed resolution:

This wording is relative to N5032.

  1. 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 type T is 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]) of declval in 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, let VAL<T> for some type T be 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 remove_cv_t<T> is the type "array of U", "pointer to U", or "reference to U", then C(T) is C(U);

      • (4.3.2) — otherwise, if remove_cv_t<T> is the type "pointer to member of class X of type U", then C(T) is the union of C(X) and C(U);

      • (4.3.3) — otherwise, if T is the type "noexceptopt function of parameter-type-list cv-qualifier-seqopt ref-qualifieropt returning U", then C(T) is the union of C(U) and C(X) for each type X in the parameter-type-list;

      • (4.3.4) — otherwise, if remove_cv_t<T> is a complete class type, then C(T) is the union of the sets C(U), for each U that is the type of a (possibly indirect) non-static data member of remove_cv_t<T>;

      • (4.3.5) — otherwise, C(T) is the set containing the single element remove_cv_t<T>.

  2. Modify [tab:meta.unary.prop], Table 54 — Type property predicates as indicated:

    TemplateConditionPreconditions
    template<class T>
    struct is_consteval_only;
    T is consteval-only (6.9.1 [basic.types.general]) remove_all_extents_t<T> shall be a complete type or _cv_ void. If C(T) does not contain std::meta::info, then it shall not contain an incomplete class type.