<div dir="ltr">Your testcase got mangled; something seems to be treating it as HTML. I think you mean something like:<div><br></div><div>struct A {</div><div> template<typename ...T> A(T...);</div><div> A(std::initializer_list<int>);</div>
<div> A(std::initializer_list<short>);</div><div>};</div><div>A a{};</div><div><br></div><div>The question here is, does A have a default constructor? I think it does not, under [class.ctor](12.1)/4, since a constructor template is not a constructor, but that may not be the intent of the standard. Usually, we perform overload resolution in cases where we need to default construct, so this case does not arise, but for list-initialization, we need to determine whether a default constructor *exists* first.</div>
<div><br></div><div>So, under a literal interpretation of the standard's wording, Clang appears to be correct. This is somewhat related to core issue 1630, but it looks like the wording fix we have there doesn't cover this question.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 1:30 AM, SENTHIL KUMAR THANGAVELU <span dir="ltr"><<a href="mailto:senthil.t@samsung.com" target="_blank">senthil.t@samsung.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p> </p>
<p>Ping! anyone has some info on the issue below?</p>
<p> </p>
<p>------- <b>Original Message</b> -------</p>
<p><b>Sender</b> : SENTHIL KUMAR THANGAVELU<<a href="mailto:senthil.t@samsung.com" target="_blank">senthil.t@samsung.com</a>> ./Senior Technical Manager/SRI-Bangalore-Native Framework/Samsung Electronics</p>
<p><b>Date</b> : Oct 30, 2013 12:44 (GMT+05:30)</p>
<p><b>Title</b> : Fwd: Is variadic template a default constructor ? gcc 4.8.1 test case variadic-default.C</p>
<p> </p>
<u></u>
<p> </p>
<p>Clang rejects this test case with diagnostic "error: call to constructor of 'A' is ambiguous".</p>
<p> </p>
<p>------- <b>Original Message</b> -------</p>
<p><b>Sender</b> : SENTHIL KUMAR THANGAVELU<<a href="mailto:senthil.t@samsung.com" target="_blank">senthil.t@samsung.com</a>> ./Senior Technical Manager/SRI-Bangalore-Native Framework/Samsung Electronics</p>
<p><b>Date</b> : Oct 30, 2013 12:40 (GMT+05:30)</p>
<p><b>Title</b> : Is variadic template a default constructor ? gcc 4.8.1 test case variadic-default.C</p>
<p> </p>Hello all,<br> There is a test case "variadic-default.C" in gcc 4.8.1 test suite discussed in <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49205" target="_blank">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49205</a> . I can see "consensus at clang was that WG21 made an oversight in allowing this" in the discussion. Anyone knows the history? also in the same discussion its mentioned "We should just treat the variadic template as a default constructor". gcc 4.8.1 and intel 64 bit compiler 13.1.3 accepts this test case. Should this be fixed in clang? or clang behaviour is correct?<br>
<br>#include <u></u><br><br>struct A {<br> template<u></u> A(T...);<br> A(std::initializer_list<u></u>);<br> A(std::initializer_list<u></u>);<br>};<br><br>A a{};<br><br>Regards<br>Senthil Kumar
<p> </p>
<p> </p>
<p>Regards</p>
<p>Senthil Kumar</p>
<p> </p>
<p> </p><u></u>
<p> </p>
<p> </p>
<p>Regards</p>
<p>Senthil Kumar</p>
<p> </p>
<p> </p>
<table>
<tbody>
<tr>
<td>
<p><img border="0" src="cid:BEI0XT4NZ5JE@namo.co.kr" width="520"></p></td></tr></tbody></table></div><img border="0" width="0" height="0"><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>