title: Std::cout function as parameter
body: <p>I recently noticed you can do stuff like</p>
  
  <pre><code>void foo(){ }
  //...
  std::cout&lt;&lt;foo&lt;&lt;std::endl;
  </code></pre>
  
  <p>This tends to print out "1", regardless of the passed function.</p>
  
  <p>Now I'm curious: What exactly is this doing?</p>