title: correct type for a signature for a generic output class
body: <p>I would just ask for a confirmation, in my opinion if I'm writing a <code>foo</code> function and I would like to give a flexible option about the object used for the output, I would use a <code>std::ostream&amp;</code> type, like that, <code>void foo(std::ostream&amp; stream, ... )</code> so the user of <code>foo</code> is able to pick anything from the <code>std::cout</code>, <code>std::cerr</code>, to a generic file output.</p>
  
  <p>Could you confirm that this is a good choice ? My only doubt is about making this work cleanly even in the case when concurrent access is needed, but I think that the user always expects to manage the lock ( since I don't think I/O streams can possibly be atomic ) on his own before and after calling this function, so I don't really think that a function used for the output should contain elements of concurrent design inside its own definition.</p>