title: operator << - how to detect last argument
body: <p>I'm writting a log class in c++. This class is an singleton. I want to add logs in such a way:</p>
  
  <pre><code>Log::GetInstance() &lt;&lt; "Error: " &lt;&lt; err_code &lt;&lt; ", in class foo";
  </code></pre>
  
  <p>Ok, and inside a Log object, I want to save this whole line at the time when the last argument comes (", in class foo" in this example).</p>
  
  <p>How to detect the last one &lt;&lt; argument? &lt;&lt; a &lt;&lt; b &lt;&lt; is_this_last &lt;&lt; maybe_this_is &lt;&lt; or_not.</p>
  
  <p>I dont to use any end tags.</p>