template<typename ...T> void g(T..., int); // expected-note 1+{{candidate}} expected-error 0-1{{C++11}}
template<typename ...T, typename A> void h(T..., A); // expected-note 1+{{candidate}} expected-error 0-1{{C++11}}
- void test_f() {
+ void test_f() {
f(0); // ok, trailing parameter pack deduced to empty
f(0, 0); // expected-error {{no matching}}
f<int>(0);
f(0, 0, 0); // expected-error {{no match}}
}
}
+
+namespace dr1307 { // dr1307: 14
+#if __cplusplus >= 201103L
+void f(int const (&)[2]);
+void f(int const (&)[3]);
+
+void caller() {
+ // This should not be ambiguous, the 2nd overload is better.
+ f({1, 2, 3});
+}
+#endif // __cplusplus >= 201103L
+} // namespace dr1307
<td><a href="https://wg21.link/cwg1307">1307</a></td>
<td>C++14</td>
<td>Overload resolution based on size of array <I>initializer-list</I></td>
- <td class="none" align="center">Unknown</td>
+ <td class="unreleased" align="center">Clang 14</td>
</tr>
<tr id="1308">
<td><a href="https://wg21.link/cwg1308">1308</a></td>