--- Comment #2 from pinskia at gcc dot gnu dot org 2009-11-06 03:59 ---
This is correct argument dependent lookup is supposed to find N::func for N::C.
You just cannot call N::func directly.
--
pinskia at gcc dot gnu dot org changed:
What|Removed
--- Comment #3 from pi3orama at gmail dot com 2009-11-06 04:09 ---
Then why
#define TYPE N::B
works?
why argument dependent lookup doesn't take effect? Both B and func are in
namespace N.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41960
--- Comment #4 from pinskia at gcc dot gnu dot org 2009-11-06 04:19 ---
(In reply to comment #3)
Then why
#define TYPE N::B
works?
why argument dependent lookup doesn't take effect? Both B and func are in
namespace N.
Because N::func is only a friend of N::C so it is only
--- Comment #5 from pi3orama at gmail dot com 2009-11-06 04:40 ---
I find a clause in the standard:
[basic.lookup.argdep]:
Any namespace-scope friend functions or friend function templates declared in
associated classes are visible within their respective namespaces even if they
are