<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 541</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="541"></A><H4>541.
  
Dependent function types
</H4>
<B>Section: </B>13.8.3.3&#160; [<A href="https://wg21.link/temp.dep.expr">temp.dep.expr</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Daveed Vandevoorde
 &#160;&#160;&#160;

 <B>Date: </B>22 October 2005<BR>


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

<P>13.8.3.3 [<A href="https://wg21.link/temp.dep.expr#3">temp.dep.expr</A>] paragraph 3 says,</P>

<BLOCKQUOTE>

An <I>id-expression</I> is type-dependent if it contains:

<UL><LI>an identifier that was declared with a dependent type...</LI></UL>

</BLOCKQUOTE>

<P>This treatment seems inadequate with regard to
<I>id-expression</I>s in function calls:</P>

<OL>

<LI>
<P>According to 13.8.3.2 [<A href="https://wg21.link/temp.dep.type#6">temp.dep.type</A>] paragraph 6,</P>

<BLOCKQUOTE>

A type is dependent if it is

<UL>

<LI>...</LI>

<LI>a compound type constructed from any dependent type...</LI>

</UL>

</BLOCKQUOTE>

<P>This would apply to the type of a member function of a class
template if any of its parameters are dependent, even if the return
type is not dependent.  However, there is no need for a call to such a
function to be a type-dependent expression because the type of the
expression is known at definition time.</P>

</LI>

<LI>
<P>This wording does not handle the case of overloaded functions,
some of which might have dependent types (however defined) and others
not.</P>

</LI>

</OL>

<P><B>Notes from the October, 2009 meeting:</B></P>

<P>The consensus of the CWG was that the first point of the issue
is not sufficiently problematic as to require a change.</P>

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

<P>Change 13.8.3.3 [<A href="https://wg21.link/temp.dep.expr#3">temp.dep.expr</A>] paragraph 3 as follows:</P>

<BLOCKQUOTE>

<P>An <I>id-expression</I> is type-dependent if it contains:</P>

<UL>
<LI><P>an <I>identifier</I> <DEL>that was</DEL> <INS>associated by
name lookup with one or more declarations</INS> declared with a
dependent type,</P></LI>

<LI><P>a <I>template-id</I> that is dependent,</P></LI>

<LI><P>a <I>conversion-function-id</I> that specifies a dependent
type, <INS>or</INS>
</P></LI>

<LI><P>a <I>nested-name-specifier</I> or a <I>qualified-id</I> that
names a member of an unknown specialization.</P></LI>

</UL>

</BLOCKQUOTE>

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