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.

Reply via email to