re PR c++/59366 (A friend function template defined in a class is found without ADL)
authorMomchil Velikov <momchil.velikov@gmail.com>
Thu, 15 Jan 2015 21:02:15 +0000 (21:02 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 15 Jan 2015 21:02:15 +0000 (16:02 -0500)
commit199b7a3586061f951fa737656217206164456910
treeb986595b92e98bfac8ddd733fa895f37db151c48
parent58b59d5ee7ac732d67736bc3654b6dc6c9af9e44
re PR c++/59366 (A friend function template defined in a class is found without ADL)

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.

From-SVN: r219689
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/name-lookup.c
gcc/testsuite/g++.dg/template/friend57.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend5.C