diff options
author | Jason Merrill <jason@redhat.com> | 2011-06-20 10:40:10 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-06-20 10:40:10 -0400 |
commit | 2602f8fe61dcf2388890bbbdb938e46ce9d2936b (patch) | |
tree | 74980f30878d41612c0e9099dcad2a36e7e9af6a /gcc/cp/call.c | |
parent | dd70e080ff7137c110f80fb43591a2d6796f1903 (diff) | |
download | gcc-2602f8fe61dcf2388890bbbdb938e46ce9d2936b.zip gcc-2602f8fe61dcf2388890bbbdb938e46ce9d2936b.tar.gz gcc-2602f8fe61dcf2388890bbbdb938e46ce9d2936b.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 05bf983..09d73d0 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -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; } |