This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35722] [C++0x] Variadic templates expansion into non-variadic class template
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 02 Oct 2011 21:45:08 +0000
- Subject: [Bug c++/35722] [C++0x] Variadic templates expansion into non-variadic class template
- Auto-submitted: auto-generated
- References: <bug-35722-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35722
--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-02 21:45:08 UTC ---
Author: jason
Date: Sun Oct 2 21:45:01 2011
New Revision: 179436
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179436
Log:
PR c++/35722
Implement N2555 (expanding pack expansion to fixed parm list)
* pt.c (coerce_template_parms): Allow expanding a pack expansion
to a fixed-length argument list.
(unify_pack_expansion): Handle explicit args properly.
(unify) [TREE_VEC]: Handle pack expansions here.
[TYPE_ARGUMENT_PACK]: Not here.
(tsubst_pack_expansion): Don't try to do partial substitution.
(pack_deducible_p): New.
(fn_type_unification): Use it.
(find_parameter_packs_r): Take the TYPE_MAIN_VARIANT
of a type parameter.
(check_non_deducible_conversion): Split from type_unification_real.
(unify_one_argument): Split from type_unification_real...
(unify_pack_expansion): ...and here. Drop call_args_p parm.
(type_unification_real, unify, more_specialized_fn): Adjust.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic-explicit1.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce1.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic117.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic118.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/variadic105.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic35.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic65.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic82.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic83.C
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/util/testsuite_tr1.h