Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bugger_gcc at interia dot pl
Target Milestone: ---
Consider the following code:
namespace N1 {
int i;
namespace N2 {
int i;
}
void f();
}
void N1::f()
{
using namespace N2;
i = 0;
}
GCC
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bugger_gcc at interia dot pl
When there is more than one class defining a friend function, name lookup fails
in the enclosing scope.
Live example: http://goo.gl/gwA3ej (also pasted at the bottom).
If either friend function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65152
--- Comment #2 from bugger_gcc at interia dot pl ---
This is not what is specified, because C++11 7.3.1.2/3 states that such friend
functions can't be found by name lookup unless it's ADL.
Note that the friend 'test' incorrec