title: Check if a given ostream object has been written to
body: <p>Can I query an <code>ostream</code> object about whether or not it has been written to? For an <code>ostringstream</code>, one could use </p>
  
  <pre><code>if(!myOssObject.str().empty())
  </code></pre>
  
  <p>What about the general case, e.g. an <code>ofstream</code> or <code>cout</code> or <code>cerr</code>?</p>