Skip to content

Commit 6914fce

Browse files
committed
New issue from Jan Schultke: "§[meta.reflection.extract] Malformed "F noexcept" type"
1 parent 177f761 commit 6914fce

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

xml/issue4298.xml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4298" status="New">
5+
<title>&sect;[meta.reflection.extract] Malformed "`F noexcept`" type</title>
6+
<section><sref ref="[meta.reflection.extract]"/></section>
7+
<submitter>Jan Schultke</submitter>
8+
<date>10 Jul 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
This is a follow-up from <a href="https://github.com/cplusplus/draft/pull/8008#discussion_r2190652506">https://github.com/cplusplus/#8008</a>
14+
<p/>
15+
In <sref ref="[meta.reflection.extract]"/> paragraph 7, the type "`F noexcept`" is used, presumably
16+
with the intent that `noexcept` would be "injected" into the <i>parameters-and-qualifiers</i> of
17+
the declarator associated with `F`.
18+
<p/>
19+
However, the syntax `F noexcept` is ill-formed, and does not have that intended effect. There ought
20+
to be a better way to phrase that.
21+
</p>
22+
</discussion>
23+
24+
<resolution>
25+
<p>
26+
This wording is relative to this
27+
<a href="https://github.com/cplusplus/draft/actions/runs/16433597877/artifacts/3583518547">CD preview draft</a>.
28+
</p>
29+
30+
<ol>
31+
32+
<li><p>Modify <sref ref="[meta.reflection.extract]"/> as indicated:</p>
33+
34+
<blockquote class="note">
35+
<p>
36+
[<i>Drafting note</i>: In bullet (7.1) we apply an additional drive-by fix for the broken
37+
"`T` is" construction before the `is_convertible_v` condition]
38+
</p>
39+
</blockquote>
40+
41+
<blockquote>
42+
<pre>
43+
template&lt;class T&gt;
44+
consteval T <i>extract-member-or-function</i>(info r); <i>// exposition only</i>
45+
</pre>
46+
<blockquote>
47+
<p>
48+
<ins>-?- Given a function type `F`, let the type `F` <i>with</i> `noexcept` be the same type,
49+
except that the <i>parameters-and-qualifiers</i> in the <i>noptr-declarator</i> describing the
50+
type contain `noexcept(true)`.</ins>
51+
<p/>
52+
-6- <i>Returns</i>: [&hellip;]
53+
<p/>
54+
-7- <i>Throws</i>: `meta::exception` unless
55+
</p>
56+
<ol style="list-style-type: none">
57+
<li><p>(7.1) &mdash; `r` represents a non-static data member with type <tt><i>X</i></tt>,
58+
that is not a bit-field, that is a direct member of class `C`, `T` and `C` are similar types
59+
(<sref ref="[conv.qual]"/>), and <del>`T` is</del> <tt>is_convertible_v&lt;<i>X</i> C::*, T&gt;</tt> is `true`;</p></li>
60+
<li><p>(7.2) &mdash; `r` represents an implicit object member function with type `F` or `F` <ins>with</ins> `noexcept`
61+
that is a direct member of a class `C`, and `T` is `F C::*`; or</p></li>
62+
<li><p>(7.3) &mdash; `r` represents a non-member function, static member function, or explicit object
63+
member function of function type `F` or `F` <ins>with</ins> `noexcept`, and `T` is `F*`.</p></li>
64+
</ol>
65+
</blockquote>
66+
</blockquote>
67+
</li>
68+
69+
</ol>
70+
</resolution>
71+
72+
</issue>

0 commit comments

Comments
 (0)