diff options
author | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-05-03 10:11:19 +0000 |
---|---|---|
committer | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-05-03 10:11:19 +0000 |
commit | 4402147197bea00a19741bafefe7f19eb4c8467f (patch) | |
tree | d0cc887d089f42e5c3dd6d1a442b14113df99313 /gcc/cp/friend.c | |
parent | 7a8e07c7d1bc8526e0d67cb7ae0dc51ba5b90f68 (diff) | |
download | gcc-4402147197bea00a19741bafefe7f19eb4c8467f.zip gcc-4402147197bea00a19741bafefe7f19eb4c8467f.tar.gz gcc-4402147197bea00a19741bafefe7f19eb4c8467f.tar.bz2 |
re PR c++/14389 (Out-of-line of overloaded template rejected)
PR c++/14389
* decl2.c (check_classfn): For member templates, compare also the
template parameters to match the declaration.
* cp-tree.h: Adjust declaration of check_classfn.
* decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
* friend.c (do_friend): Likewise.
* pt.c (tsubst_friend_function): Likewise.
PR c++/14389
* g++.dg/template/member5.C: New test.
From-SVN: r81426
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r-- | gcc/cp/friend.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index c81bd93..e55adaa 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -397,7 +397,10 @@ do_friend (tree ctype, tree declarator, tree decl, validity of the declaration later. */ decl = push_template_decl_real (decl, /*is_friend=*/1); else - decl = check_classfn (ctype, decl, template_member_p); + decl = check_classfn (ctype, decl, + template_member_p + ? current_template_parms + : NULL_TREE); if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL) decl = DECL_TI_TEMPLATE (decl); |