Skip to content

Commit a79cbd1

Browse files
tomaszkamjwakely
authored andcommitted
New issue: Names of parameters of addressable function shall remain unspecified
1 parent 1ca13ed commit a79cbd1

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

xml/issue4469.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4469" status="New">
5+
<title>Names of parameters of addressable function shall remain unspecified</title>
6+
<section><sref ref="[namespace.std]"/></section>
7+
<submitter>Tomasz Kamiński</submitter>
8+
<date>14 Nov 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>The wording in <sref ref="[namespace.std]"/> p7 guarantees that reflection of the
13+
addressable function can be reliably produced. With the addition of the function
14+
parameter name, it is possible to access the parameter name of such functions:</p>
15+
<pre>
16+
constexpr auto p = parameters_of(^^std::endl)[0];
17+
static_assert( identifier_of(p) == "os" ); // guaranteed?
18+
</pre>
19+
20+
<p>We should clarify that parameter names used by standard library implementation
21+
remain unspecified, by making behavior of `has_identifier` and `identifier_of`
22+
unspecified on reflection of such parameter. Marking the behavior
23+
rather than result unspecified, allows implementations to reject such calls.</p>
24+
</discussion>
25+
26+
<resolution>
27+
<p>
28+
This wording is relative to <paper num="N5014"/>.
29+
</p>
30+
31+
<ol>
32+
<li><p>Modify <sref ref="[namespace.std]"/>, as indicated:</p>
33+
34+
<blockquote>
35+
<p>Let <i>F</i> denote a standard library function or function template.
36+
Unless <i>F</i> is designated an addressable function, it is unspecified if or
37+
how a reflection value designating the associated entity can be formed.
38+
<ins>For any value <tt><i>p</i></tt> of type `meta::info` that represents a
39+
reflection of a parameter of <i>F</i>, the behavior of <tt>has_identifier(<i>p</i>)</tt>
40+
and <tt>has_identifier(<i>p</i>)</tt> is unspecified.</ins></p>
41+
</blockquote>
42+
</li>
43+
</ol>
44+
45+
</resolution>
46+
47+
</issue>

0 commit comments

Comments
 (0)