public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59366] New: A friend function template defined in a class is found without ADL
@ 2013-12-02 10:04 ville.voutilainen at gmail dot com
2014-05-05 10:09 ` [Bug c++/59366] " momchil.velikov at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: ville.voutilainen at gmail dot com @ 2013-12-02 10:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59366
Bug ID: 59366
Summary: A friend function template defined in a class is found
without ADL
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
Reduced test:
struct X
{
//friend void f(int) {} // #1
template <class T> friend void f(T) {} // #2
};
int main()
{
f(5); // #3
}
The function in #1 is correctly not found at #3. The template
at #2 is, which shouldn't happen since such a friend should be
found by ADL only, and there's no ADL going on here.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59366] A friend function template defined in a class is found without ADL
2013-12-02 10:04 [Bug c++/59366] New: A friend function template defined in a class is found without ADL ville.voutilainen at gmail dot com
@ 2014-05-05 10:09 ` momchil.velikov at gmail dot com
2015-01-15 21:02 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: momchil.velikov at gmail dot com @ 2014-05-05 10:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59366
--- Comment #1 from Momchil Velikov <momchil.velikov at gmail dot com> ---
Proposed fix:
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00198.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59366] A friend function template defined in a class is found without ADL
2013-12-02 10:04 [Bug c++/59366] New: A friend function template defined in a class is found without ADL ville.voutilainen at gmail dot com
2014-05-05 10:09 ` [Bug c++/59366] " momchil.velikov at gmail dot com
@ 2015-01-15 21:02 ` jason at gcc dot gnu.org
2015-01-22 14:04 ` ville.voutilainen at gmail dot com
2021-08-02 5:24 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2015-01-15 21:02 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59366] A friend function template defined in a class is found without ADL
2013-12-02 10:04 [Bug c++/59366] New: A friend function template defined in a class is found without ADL ville.voutilainen at gmail dot com
2014-05-05 10:09 ` [Bug c++/59366] " momchil.velikov at gmail dot com
2015-01-15 21:02 ` jason at gcc dot gnu.org
@ 2015-01-22 14:04 ` ville.voutilainen at gmail dot com
2021-08-02 5:24 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ville.voutilainen at gmail dot com @ 2015-01-22 14:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59366
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Thus done.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59366] A friend function template defined in a class is found without ADL
2013-12-02 10:04 [Bug c++/59366] New: A friend function template defined in a class is found without ADL ville.voutilainen at gmail dot com
` (2 preceding siblings ...)
2015-01-22 14:04 ` ville.voutilainen at gmail dot com
@ 2021-08-02 5:24 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-02 5:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59366
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |6.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-02 5:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-02 10:04 [Bug c++/59366] New: A friend function template defined in a class is found without ADL ville.voutilainen at gmail dot com
2014-05-05 10:09 ` [Bug c++/59366] " momchil.velikov at gmail dot com
2015-01-15 21:02 ` jason at gcc dot gnu.org
2015-01-22 14:04 ` ville.voutilainen at gmail dot com
2021-08-02 5:24 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).