title: Eclipse complains: "Invalid overload of 'endl'" - but code does compile
body: <p>I've written an operator&lt;&lt; for my templated class:</p>
  
  <pre><code>template&lt;class T&gt;
  std::ostream&amp; operator&lt;&lt;(std::ostream &amp;strm, const MyClass&lt;T&gt; &amp;obj)
  </code></pre>
  
  <p>and when I write</p>
  
  <pre><code>cout &lt;&lt; myClassInstance &lt;&lt; endl;
  </code></pre>
  
  <p>this compiles and runs, but my Eclipse CDT says:</p>
  
  <blockquote>
    <p>Invalid overload of 'endl'</p>
  </blockquote>
  
  <p>Why does it tell me that?</p>
  
  <p>(I use Eclipse CDT Kepler on Win7 64bit with Cygwin gcc)</p>