Commit 2602f8fe by Jason Merrill Committed by Jason Merrill

re PR c++/49205 ([C++0x] Default constructor with pack expansion parameter not detected)

	PR c++/49205
	* call.c (sufficient_parms_p): Allow parameter packs too.

From-SVN: r175214
parent dd70e080
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.
......
......@@ -534,15 +534,16 @@ null_ptr_cst_p (tree t)
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;
}
......
2011-06-20 Jason Merrill <jason@redhat.com>
PR c++/49205
* g++.dg/cpp0x/variadic-default.C: New.
PR c++/43321
* g++.dg/cpp0x/auto26.C: New.
......
// 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{};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment