signature output operator overload
- by coubeatczech
hi, do you know, how to write signature of a function or method for operator<< for template class in C++? I want something like:
template <class A class MyClass{
public:
friend ostream & operator<<(ostream & os, MyClass<A mc);
}
ostream & operator<<(ostream & os, MyClass<A mc){
// some code
return os;
}
But this just won't compile. Do anyone know, how to write it correctly?