[C++ PATCH] Fix unification of template template parameters (PRs 32565, 33943, 33965)

Doug Gregor doug.gregor@gmail.com
Tue Dec 18 22:15:00 GMT 2007


On Dec 17, 2007 11:21 PM, Jason Merrill <jason@redhat.com> wrote:
> Doug Gregor wrote:
> > Aside from combining ttp25-27.C into a single test case, extending
> > that test-case with some non-deduced contexts, and fixing the comment
> > you referred to... is the patch okay for mainline?
>
> The substantive change I was asking for was changing the unify call
> below that comment to pass argtmplvec instead of argvec.

We decided to leave the call here (to coerce_template_parms) alone for
now, and are going to look into using unify() to deduce types based on
matching the template template parameter's template parameter list
with the template argument's template parameter list. The final,
committed patch is attached.

  - Doug

2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
            Jakub Jelinek  <jakub@redhat.com>
	
	PR c++/32565
	PR c++/33943
	PR c++/33965
	* pt.c (template_template_parm_bindings_ok_p): New; verifies
	bindings of template template parameters after all template
	arguments have been deduced.
	(coerce_template_parms): Don't complain when COMPLAIN doesn't
	include tf_error.
	(fn_type_unification): Use template_template_parm_bindings_ok_p.
	(unify): Deal with variadic, bound template template parameters.
	(get_class_bindings): Use template_template_parm_bindings_ok_p.
	
	
2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
	    Jakub Jelinek  <jakub@redhat.com>
	
	PR c++/32565
	PR c++/33943
	PR c++/33965
	* g++.dg/cpp0x/variadic86.C: New.
	* g++.dg/cpp0x/variadic87.C: New.
	* g++.dg/cpp0x/variadic84.C: New.
	* g++.dg/cpp0x/variadic85.C: New.
	* g++.dg/template/ttp25.C: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: variadic-ttp.patch
Type: application/octet-stream
Size: 11957 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071218/c1a77a6b/attachment.obj>


More information about the Gcc-patches mailing list