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

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).