<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1631</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="1631"></A><H4>1631.
  
Incorrect overload resolution for single-element <I>initializer-list</I>
</H4>
<B>Section: </B>12.2.4.2.6&#160; [<A href="https://wg21.link/over.ics.list">over.ics.list</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Johannes Schaub
 &#160;&#160;&#160;

 <B>Date: </B>2013-03-03<BR>


<P>[Moved to DR at the November, 2014 meeting.]</P>



<P>According to bullet 1 of 12.2.4.2.6 [<A href="https://wg21.link/over.ics.list">over.ics.list</A>] paragraph
6,</P>

<BLOCKQUOTE>

<P>Otherwise, if the parameter type is not a class:</P>

<UL>
<LI><P>if the initializer list has one element, the implicit conversion
sequence is the one required to convert the element to the parameter
type;</P></LI>

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

</UL>

</BLOCKQUOTE>

<P>This wording ignores the possibility that the element might be an
initializer list (as opposed to an expression with a type, as illustrated
in the example).  This oversight affects an example like:</P>

<PRE>
  struct A { int a[1]; };
  struct B { B(int); };
  void f(B, int);
  void f(int, A);

  int main() {
    f({0}, {{1}});
  }
</PRE>

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

<P>This issue is resolved by the resolution of
<A HREF="1467.html">issue 1467</A>.</P>

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