Commit 68361a03 by Mark Mitchell Committed by Mark Mitchell

re PR c++/10845 (template member function (getting a nested template as…

re PR c++/10845 (template member function (getting a nested template as parameter) cannot be called anymore if another unrelated template member function is defined.)

	PR c++/10845
	* pt.c (try_class_unification): Correct handling of member class
	templates.

	* semantics.c (genrtl_finish_function): Adjust
	expand_function_end call.

From-SVN: r68269
parent f5a6463e
2003-06-20 Mark Mitchell <mark@codesourcery.com>
PR c++/10845
* pt.c (try_class_unification): Correct handling of member class
templates.
2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c (genrtl_finish_function): Adjust
......
......@@ -9078,7 +9078,8 @@ try_class_unification (tree tparms, tree targs, tree parm, tree arg)
tree copy_of_targs;
if (!CLASSTYPE_TEMPLATE_INFO (arg)
|| CLASSTYPE_TI_TEMPLATE (arg) != CLASSTYPE_TI_TEMPLATE (parm))
|| (most_general_template (CLASSTYPE_TI_TEMPLATE (arg))
!= most_general_template (CLASSTYPE_TI_TEMPLATE (parm))))
return NULL_TREE;
/* We need to make a new template argument vector for the call to
......
2003-06-20 Mark Mitchell <mark@codesourcery.com>
PR c++/10845
* g++.dg/template/member3.C: New test.
2003-06-19 Mark Mitchell <mark@codesourcery.com>
PR c++/10939
......
template<typename T>
struct A {
template<typename L> struct SubA { };
template<typename T1,typename L> void f(T1 & t1, SubA<L> & t2) { }
template<typename U> void g(SubA<U> & suba) { }
template<typename U> void h(SubA<U> & suba) { }
};
int main(void) {
int i;
A<int> a;
A<int>::SubA<int> suba;
a.f(i,suba);
a.g(suba);
a.h(suba);
}
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