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.
{can_}substitute specification is (still) ill-formedSection: 21.4.13 [meta.reflection.substitute] Status: New Submitter: S. B. Tam Opened: 2026-05-05 Last modified: 2026-05-09
Priority: Not Prioritized
View all other issues in [meta.reflection.substitute].
View all issues with New status.
Discussion:
The use of template [: x :] (introduced in LWG 4316(i)) is incorrect: template [: x :]
is a splice-expression (which can only designate a function template or variable template),
and an unparenthesized splice-expression is not allowed as a template-argument per
13.3 [temp.names]/6.
Proposed resolution:
This wording is relative to N5032.
Modify 21.4.13 [meta.reflection.substitute] as indicated:
-1- Let
TARG-SPLICE(x)be:
(1.1) —
a template-argument that denotes whattemplate [: x :]xrepresents ifis_template(x)istrue, otherwise(1.2) —
typename [: x :]ifis_type(x)istrue, otherwise(1.3) —
([: x :]).