<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 598</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="598"></A><H4>598.
  
Associated namespaces of overloaded functions and function templates
</H4>
<B>Section: </B>6.5.4&#160; [<A href="https://wg21.link/basic.lookup.argdep">basic.lookup.argdep</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Mike Miller
 &#160;&#160;&#160;

 <B>Date: </B>27 September 2006<BR>


<P>[Voted into the WP at the March, 2009 meeting.]</P>

<P>The resolution of <A HREF="33.html">issue 33</A> added the
following wording in 6.5.4 [<A href="https://wg21.link/basic.lookup.argdep">basic.lookup.argdep</A>]:</P>

<BLOCKQUOTE>

In addition, if the argument is the name or address of a set of
overloaded functions and/or function templates, its associated classes
and namespaces are the union of those associated with each of the
members of the set: the namespace in which the function or function
template is defined and the classes and namespaces associated with its
(non-dependent) parameter types and return type.

</BLOCKQUOTE>

<P>This wording is self-contradictory: although it claims that the
treatment of overload sets is intended to be &#8220;the union of those
associated with each of the members of the set,&#8221; it says that
the namespace of which each function or function template is a member
is to be considered an associated namespace.  That is different from
the case of a non-overloaded function argument; in that case, because
only the <I>type</I> of the argument is considered, the namespace of
which the function is a member is <I>not</I> an associated namespace.
This should be rectified so that overloaded and unoverloaded functions
really are treated the same.</P>

<P><B>Proposed resolution (June, 2008):</B></P>

<P>Change 6.5.4 [<A href="https://wg21.link/basic.lookup.argdep#2">basic.lookup.argdep</A>] paragraph 2 as follows:</P>

<BLOCKQUOTE>

...In addition, if the argument is the name or address of a set
of overloaded functions and/or function templates, its associated
classes and namespaces are the union of those associated with
each of the members of the set<DEL>: the namespace in which the
function or function template is defined and</DEL><INS>, i.e.,</INS>
the classes and namespaces associated with its (non-dependent)
parameter types and return type.

</BLOCKQUOTE>

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