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
This commit is contained in:
parent
f5a6463ed6
commit
68361a0396
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
19
gcc/testsuite/g++.dg/template/member3.C
Normal file
19
gcc/testsuite/g++.dg/template/member3.C
Normal file
@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user