[Bug c++/41960] g++: friend introduce name into namespace, violate standard

2009-11-05 Thread pinskia at gcc dot gnu dot org
--- 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

[Bug c++/41960] g++: friend introduce name into namespace, violate standard

2009-11-05 Thread pi3orama at gmail dot com
--- 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

[Bug c++/41960] g++: friend introduce name into namespace, violate standard

2009-11-05 Thread pinskia at gcc dot gnu dot org
--- 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

[Bug c++/41960] g++: friend introduce name into namespace, violate standard

2009-11-05 Thread pi3orama at gmail dot com
--- 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