Skip to content

Commit c81ae14

Browse files
committed
New issue from Matthias Wippich: "{can_}substitute specification is ill-formed"
1 parent 3086e07 commit c81ae14

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

xml/issue4316.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4316" status="New">
5+
<title><tt>{can_}substitute</tt> specification is ill-formed</title>
6+
<section>
7+
<sref ref="[meta.reflection.substitute]"/>
8+
</section>
9+
<submitter>Matthias Wippich</submitter>
10+
<date>15 Aug 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<p>
15+
`can_substitute` and `substitute` are currently specified in terms of splices in a template argument list:
16+
<p/>
17+
<sref ref="[meta.reflection.substitute]"/> p3:
18+
</p>
19+
<blockquote><p>
20+
<i>Returns</i>: `true` if <tt>Z&lt;[:Args:]...&gt;</tt> is a valid <i>template-id</i> (<sref ref="temp.names]"/>)
21+
that does not name a function whose type contains an undeduced placeholder type. Otherwise, `false`.
22+
</p></blockquote>
23+
<p>
24+
<sref ref="[meta.reflection.substitute]"/> p7:
25+
</p>
26+
<blockquote><p>
27+
<i>Returns</i>: <tt>^^Z&lt;[:Args:]...&gt;</tt>.
28+
</p></blockquote>
29+
<p>
30+
This wording was introduced in <paper num="P2996R11"/>. However, merging in changes from
31+
<paper num="P3687"/> "Final Adjustments to C++26 Reflection" in <paper num="P2996R13"/> changed
32+
the rules for splices in this context. This makes `can_substitute` and `substitute` as specified
33+
currently ill-formed. We cannot use the given syntax to splice an arbitrary choice of values,
34+
types and templates anymore.
35+
<p/>
36+
While the intent seems clear, this should be rephrased to be more technically correct.
37+
</p>
38+
</discussion>
39+
40+
<resolution>
41+
</resolution>
42+
43+
</issue>

0 commit comments

Comments
 (0)