I've written an operator<< for my templated class:
template<class T>
std::ostream& operator<<(std::ostream &strm, const MyClass<T> &obj)
and when I write
cout << myClassInstance << endl;
this compiles and runs, but my Eclipse CDT says:
Invalid overload of 'endl'
Why does it tell me that?
(I use Eclipse CDT Kepler on Win7 64bit with Cygwin gcc)
This is indeed a bug with Eclipse CDT (more specifically Eclipse's Code Analysis tool CODAN). There is bug report and it has been fixed and should be available from CDT 8.3.0 which is due February 2014.