deklaration: binary operator als friend einer nested class(template)
-
template<class T> struct Bar { class iter { friend bool operator== <> (iter, iter); // fehler }; }; template<class T> inline bool operator== (Bar<int>::iter, Bar<int>::iter) { return true; }test.cc:3: error: declaration of 'operator==' as non-function
test.cc:3: error: expected ';' before '<' tokenwie muss die friend deklaration in zeile 3 aussehen?
-
Noch ein wöchentlich wiederkehrendes Thema
Template und op-überladung