--- 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
correctly resolved
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nick dot orlov at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35631