Skip to content

Commit 4492036

Browse files
committed
update
1 parent 1001bc7 commit 4492036

File tree

1 file changed

+52
-8
lines changed

1 file changed

+52
-8
lines changed

issues/2917.html

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Core Issues List revision 115a.
1717
See http://www.open-std.org/jtc1/sc22/wg21/ for the official
1818
list.</EM></P>
19-
<P>2024-08-07</P>
19+
<P>2024-08-17</P>
2020
<HR>
2121
<A NAME="2917"></A><H4>2917.
2222

@@ -25,13 +25,15 @@
2525
<B>Section: </B>13.1&#160; [<A href="https://wg21.link/temp.pre">temp.pre</A>]
2626
&#160;&#160;&#160;
2727

28-
<B>Status: </B>open
28+
<B>Status: </B>review
2929
&#160;&#160;&#160;
3030

3131
<B>Submitter: </B>Ambrose T
3232
&#160;&#160;&#160;
3333

34-
<B>Date: </B>2024-07-30<BR>
34+
<B>Date: </B>2024-07-30
35+
&#160;&#160;&#160;
36+
<B>Liaison: </B>EWG<BR>
3537

3638

3739
<P>(From submissions
@@ -63,7 +65,7 @@
6365
};
6466
</PRE>
6567

66-
<P><U>Suggested resolution:</U></P>
68+
<P><B>Proposed resolution (2024-08-16):</B></P>
6769

6870
<P>(<A HREF="2862.html">Issue 2862</A> modifies the same paragraph.)</P>
6971

@@ -78,10 +80,8 @@
7880
<INS>In a <I>template-declaration</I> whose <I>declaration</I> is
7981
a <I>friend-type-declaration</I>,
8082
the <I>friend-type-specifier-list</I> shall consist of exactly
81-
one <I>friend-type-specifier</I>; if it is a pack expansion
82-
(13.7.4 [<A href="https://wg21.link/temp.variadic">temp.variadic</A>]), any packs expanded by that pack
83-
expansion shall not have been introduced by
84-
the <I>template-declaration</I>. [ Example:</INS>
83+
one <I>friend-type-specifier</I> that is not a pack expansion. [
84+
Example:</INS>
8585

8686
<PRE class="ins">
8787
template&lt;class ...&gt;
@@ -100,6 +100,50 @@
100100
<INS>-- end example ]</INS>
101101

102102
</BLOCKQUOTE>
103+
104+
<P><B>CWG 2024-08-16</B></P>
105+
106+
<P>The proposed resolution above disallows a few examples from paper
107+
<A HREF="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2893r3.html">P2893R3</A>
108+
(Variadic friends), such as
109+
</P>
110+
111+
<PRE>
112+
template&lt;class... Ts&gt;
113+
struct VS {
114+
template&lt;class U&gt;
115+
friend class C&lt;Ts&gt;::Nested...; //<SPAN CLASS="cmnt"> now ill-formed</SPAN>
116+
};
117+
</PRE>
118+
119+
<P>The adopted wording for P2893R3 makes
120+
the <I>friend-type-specifier</I> (not the
121+
entire <I>template-declaration</I>) the pattern that is expanded by
122+
the pack expansion, leading to the expansion
123+
</P>
124+
125+
<PRE>
126+
struct VS&lt;T1, T2, T3&gt; {
127+
template&lt;class U&gt;
128+
friend class C&lt;T1&gt;::Nested, class C&lt;T2&gt;::Nested, class C&lt;T3&gt;::Nested;
129+
};
130+
</PRE>
131+
132+
<P>However, that violates the principle that
133+
a <I>template-declaration</I> declares exactly one entity
134+
(see <A HREF="2862.html">issue 2862</A>).</P>
135+
136+
<P>As an aside, the paper as adopted misrepresents the status of
137+
members of dependent types, which are covered by
138+
13.7.5 [<A href="https://wg21.link/temp.friend#5">temp.friend</A>] paragraph 5.</P>
139+
140+
<P>CWG welcomes a paper making the template friend cases valid, but
141+
such a facility would appear to require substantial changes to the
142+
normative wording, which a core issue is not equipped for.</P>
143+
144+
<P>CWG asks EWG to consent to the reduction in scope for the variadic
145+
friends facility.</P>
146+
103147
<BR><BR>
104148
</BODY>
105149
</HTML>

0 commit comments

Comments
 (0)