------- Comment #2 from nick dot orlov at mail dot ru 2008-03-19 12:44 ------- Standard says:
11.4.6. A function can be defined in a friend declaration of a class if and only if the class is a non-local class (9.8), the function name is unqualified, and the function has namespace scope. 11.4.7 Such a function is implicitly inline. A friend function defined in a class is in the (lexical) scope of the class in which it is defined. A friend function defined outside the class is not (3.4.1) ======= So I would agree, but in my example operator is being called from a (static) class method. -- nick dot orlov at mail dot ru changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35631