Must a template friend operator overload precede a member function overload of the same operator?
Does anybody know why this compiles: template<typename T> class Foo; template<typename T> bool operator==(const T& l, const Foo<T>& r); template<typename T> class Foo { public: Foo(); ~Foo(); friend bool operator== <> (const T& l, const Foo<T>& r); bool operator==(const Foo<T>& r); }; But this does not (only difference is order of member vs friend operator==):… Read More Must a template friend operator overload precede a member function overload of the same operator?