------- 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 not visible during an ordinary lookup. g++ is right. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41960