title: pass std::endl to std::operator <<
body: <p>In this <a href="https://stackoverflow.com/a/8111734/2345484">Stack Overflow answer</a>
  it says that <code>std::cout &lt;&lt; "Hello World!" &lt;&lt; std::endl;</code> is the same as </p>
  
  <pre><code>std::operator&lt;&lt;(std::operator&lt;&lt;(std::cout, "Hello World!"), std::endl);
  </code></pre>
  
  <p>But when I compile the above line code, it doesn't compile! Then after trying something else I found that the reason it doesn't compile is because of <code>std::endl</code>, if I replace <code>std::endl</code> by <code>"\n"</code> then it works. But why you can not pass <code>std::endl</code> to <code>std::operator&lt;&lt;</code>?</p>
  
  <p>Or more simply, isn't <code>std::cout&lt;&lt;std::endl;</code> the same as <code>std::operator&lt;&lt;(std::cout, std::endl);</code>?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>When compile with <code>icpc test.cpp</code>, the error message is 
  <code>error: no instance of overloaded function "std::operator&lt;&lt;" matches the argument list argument types are: (std::ostream, &lt;unknown-type&gt;) std::operator&lt;&lt;(std::cout, std::endl);</code></p>
  
  <p>and <code>g++ test.cpp</code> gives much much longer error message.</p>