<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1563</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="1563"></A><H4>1563.
  
List-initialization and overloaded function disambiguation
</H4>
<B>Section: </B>12.3&#160; [<A href="https://wg21.link/over.over">over.over</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Daniel Kr&#252;gler
 &#160;&#160;&#160;

 <B>Date: </B>2012-10-08<BR>


<P>[Moved to DR at the April, 2013 meeting.]</P>



<P>Presumably, 12.3 [<A href="https://wg21.link/over.over#1">over.over</A>] paragraph 1,</P>

<BLOCKQUOTE>

<P>A use of an overloaded function name without arguments is resolved in
certain contexts to a function, a pointer to function or a pointer to
member function for a specific function from the overload set. A
function template name is considered to name a set of overloaded
functions in such contexts.  The function selected is the one whose
type is identical to the function type of the target type required in
the context.  [<I>Note:</I> That is, the class of which the function
is a member is ignored when matching a pointer-to-member-function
type.  &#8212;<I>end note</I>] The target can be</P>

<UL>
<LI><P>an object or reference being initialized (9.5 [<A href="https://wg21.link/dcl.init">dcl.init</A>],
9.5.4 [<A href="https://wg21.link/dcl.init.ref">dcl.init.ref</A>]),</P></LI>

<LI><P>...</P></LI>

</UL>

</BLOCKQUOTE>

<P>should apply to an example like</P>

<PRE>
  double bar(double) { return 0.0; }
  float bar(float) { return 0.0f; }

  using fun = double(double);
  fun &amp;foo{bar};
</PRE>

<P>However, there is implementation variance in whether the use of
<TT>bar</TT> is accepted or not, and the omission of a cross-reference
to 9.5.5 [<A href="https://wg21.link/dcl.init.list">dcl.init.list</A>] might be read as indicating that
list-initialization is not included.</P>

<P><B>Proposed resolution (February, 2013):</B></P>

<P>Change 12.3 [<A href="https://wg21.link/over.over#1">over.over</A>] paragraph 1 as follows:</P>

<BLOCKQUOTE>

<P>...The target can be</P>

<UL>
<LI><P>an object or reference being initialized
(9.5 [<A href="https://wg21.link/dcl.init">dcl.init</A>], 9.5.4 [<A href="https://wg21.link/dcl.init.ref">dcl.init.ref</A>]<INS>,
9.5.5 [<A href="https://wg21.link/dcl.init.list">dcl.init.list</A>]</INS>),</P></LI>

<LI><P>...</P></LI>

</UL>

</BLOCKQUOTE>

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