This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59366] A friend function template defined in a class is found without ADL
- 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: Thu, 15 Jan 2015 21:02:48 +0000
- Subject: [Bug c++/59366] A friend function template defined in a class is found without ADL
- Auto-submitted: auto-generated
- References: <bug-59366-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59366
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jan 15 21:02:15 2015
New Revision: 219689
URL: https://gcc.gnu.org/viewcvs?rev=219689&root=gcc&view=rev
Log:
PR c++/59366
* name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
and function templates, declared only in the class.
* decl.c (duplicate_decls): Reveal hidden friend functions or
function templates, if they are redeclared outside the class.
Added:
trunk/gcc/testsuite/g++.dg/template/friend57.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/g++.old-deja/g++.pt/friend5.C