Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer committed Aug 17, 2024
1 parent 1001bc7 commit 4492036
Showing 1 changed file with 52 additions and 8 deletions.
60 changes: 52 additions & 8 deletions issues/2917.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Core Issues List revision 115a.
See http://www.open-std.org/jtc1/sc22/wg21/ for the official
list.</EM></P>
<P>2024-08-07</P>
<P>2024-08-17</P>
<HR>
<A NAME="2917"></A><H4>2917.

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

<B>Status: </B>open
<B>Status: </B>review
&#160;&#160;&#160;

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

<B>Date: </B>2024-07-30<BR>
<B>Date: </B>2024-07-30
&#160;&#160;&#160;
<B>Liaison: </B>EWG<BR>


<P>(From submissions
Expand Down Expand Up @@ -63,7 +65,7 @@
};
</PRE>

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

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

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

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

</BLOCKQUOTE>

<P><B>CWG 2024-08-16</B></P>

<P>The proposed resolution above disallows a few examples from paper
<A HREF="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2893r3.html">P2893R3</A>
(Variadic friends), such as
</P>

<PRE>
template&lt;class... Ts&gt;
struct VS {
template&lt;class U&gt;
friend class C&lt;Ts&gt;::Nested...; //<SPAN CLASS="cmnt"> now ill-formed</SPAN>
};
</PRE>

<P>The adopted wording for P2893R3 makes
the <I>friend-type-specifier</I> (not the
entire <I>template-declaration</I>) the pattern that is expanded by
the pack expansion, leading to the expansion
</P>

<PRE>
struct VS&lt;T1, T2, T3&gt; {
template&lt;class U&gt;
friend class C&lt;T1&gt;::Nested, class C&lt;T2&gt;::Nested, class C&lt;T3&gt;::Nested;
};
</PRE>

<P>However, that violates the principle that
a <I>template-declaration</I> declares exactly one entity
(see <A HREF="2862.html">issue 2862</A>).</P>

<P>As an aside, the paper as adopted misrepresents the status of
members of dependent types, which are covered by
13.7.5 [<A href="https://wg21.link/temp.friend#5">temp.friend</A>] paragraph 5.</P>

<P>CWG welcomes a paper making the template friend cases valid, but
such a facility would appear to require substantial changes to the
normative wording, which a core issue is not equipped for.</P>

<P>CWG asks EWG to consent to the reduction in scope for the variadic
friends facility.</P>

<BR><BR>
</BODY>
</HTML>

0 comments on commit 4492036

Please sign in to comment.