2011-06-20 Jason Merrill <jason@redhat.com>
+ PR c++/49205
+ * call.c (sufficient_parms_p): Allow parameter packs too.
+
PR c++/43321
* semantics.c (describable_type): Remove.
* cp-tree.h: Likewise.
return false;
}
-/* Returns nonzero if PARMLIST consists of only default parms and/or
- ellipsis. */
+/* Returns nonzero if PARMLIST consists of only default parms,
+ ellipsis, and/or undeduced parameter packs. */
bool
sufficient_parms_p (const_tree parmlist)
{
for (; parmlist && parmlist != void_list_node;
parmlist = TREE_CHAIN (parmlist))
- if (!TREE_PURPOSE (parmlist))
+ if (!TREE_PURPOSE (parmlist)
+ && !PACK_EXPANSION_P (TREE_VALUE (parmlist)))
return false;
return true;
}
--- /dev/null
+// PR c++/49205
+// { dg-options -std=c++0x }
+
+#include <initializer_list>
+
+struct A {
+ template<typename ...T> A(T...);
+ A(std::initializer_list<short>);
+ A(std::initializer_list<long>);
+};
+
+A a{};