<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 633</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="633"></A><H4>633.
  
Specifications for variables that should also apply to references
</H4>
<B>Section: </B>6.1&#160; [<A href="https://wg21.link/basic.pre">basic.pre</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Alisdair Meredith
 &#160;&#160;&#160;

 <B>Date: </B>17 May 2007<BR><BR>


<A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3086.html#UK22">N2800 comment
  UK&#160;22<BR></A>

<P>[Voted into WP at March, 2010 meeting as document N2993.]</P>

<P>There are a number of specifications in the Standard that should
also apply to references.  For example:</P>

<UL>
<LI><P>6.1 [<A href="https://wg21.link/basic.pre">basic.pre</A>] paragraphs 3-4 indicate that a reference
cannot have a name because it is not an entity.  (See also
<A HREF="485.html">issue 485</A>.)</P></LI>

<LI><P>6.5.3 [<A href="https://wg21.link/basic.lookup.unqual#13">basic.lookup.unqual</A>] paragraph 13 covers unqualified
lookup in the initializer of a variable member of a namespace but not
that of a reference member of a namespace.  It would be very strange
if the lookup in these two cases were different.</P></LI>

<LI><P>6.7 [<A href="https://wg21.link/basic.link#8">basic.link</A>] paragraph 8 prohibits use of a type
without linkage as the type of a variable with linkage, but not as the
type of a reference with linkage.  (References with linkage are
explicitly mentioned earlier in the section.)</P></LI>

<LI><P>6.8.6.2 [<A href="https://wg21.link/basic.stc.static#3">basic.stc.static</A>] paragraph 3 permits local static
variables but not local static references.</P></LI>

</UL>

<P>A number of other examples could be cited.  A thorough review
is needed to make sure that references are completely
specified.</P>

<P><B>Notes from the September, 2008 meeting:</B></P>

<P>The CWG expressed interest in an approach that would define
&#8220;variable&#8221; to include both objects and references and
to use that for both this issue and <A HREF="570.html">issue 570</A>.</P>

<P><B>Proposed resolution (October, 2009):</B></P>

<P>See paper PL22.16/09-0183 = WG21 N2993.  This resolution also resolves
<A HREF="570.html">issue 570</A>.</P>

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