This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59366] A friend function template defined in a class is found without ADL


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]