[Bug c++/59366] New: A friend function template defined in a class is found without ADL
ville.voutilainen at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 2 10:04:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list