<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 62</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="62"></A><H4>62.
  
Unnamed members of classes used as type parameters
</H4>
<B>Section: </B>13.4.2&#160; [<A href="https://wg21.link/temp.arg.type">temp.arg.type</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD1
 &#160;&#160;&#160;

 <B>Submitter: </B>Steve Adamczyk
 &#160;&#160;&#160;

 <B>Date: </B>13 Oct 1998<BR>



<P>[Moved to DR at 4/01 meeting.]</P>

<P>Section 13.4.2 [<A href="https://wg21.link/temp.arg.type#2">temp.arg.type</A>] paragraph 2
says</P>
<BLOCKQUOTE>A local type, a type with no linkage, an unnamed type or a
type compounded from any of these types shall not be used as a <I>template-argument
</I>for a template <I>type-parameter</I>.</BLOCKQUOTE>
<P>It probably wasn't intended that classes with unnamed members should be
included in this list, but they are arguably compounded from unnamed types.</P>

<P><B>Proposed resolution (04/01):</B></P>

<P>In 13.4.2 [<A href="https://wg21.link/temp.arg.type#2">temp.arg.type</A>] paragraph 2, change</P>

<BLOCKQUOTE>

A local type, a type with no linkage, an unnamed type or a type
compounded from any of these types shall not be used as a
<I>template-argument</I> for a template <I>type-parameter</I>.

</BLOCKQUOTE>

<P>to</P>

<BLOCKQUOTE>

The following types shall not be used as a <I>template-argument</I>
for a template <I>type-parameter</I>:

<UL>

<LI>a type whose name has no linkage</LI>

<LI>an unnamed class or enumeration type that has no name for
linkage purposes (9.2.4 [<A href="https://wg21.link/dcl.typedef">dcl.typedef</A>])</LI>

<LI>a cv-qualified version of one of the types in this list</LI>

<LI>a type created by application of declarator operators to one
of the types in this list</LI>

<LI>a function type that uses one of the types in this list</LI>

</UL>

</BLOCKQUOTE>

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