title: Is it possible to know the length of std::wostringstream before calling .str()?
body: <p>I am looking into <strong>std::wostringstream</strong> and how to properly use it. I was wondering if there is any way of knowing the length of the constructed string beforehand? I tried searching for information on MSDN and <a href="http://en.cppreference.com/w/" rel="nofollow">http://en.cppreference.com/w/</a> and finally google but couldn't find what I was looking for.</p>
  
  <p>For example if I pass a reference of <strong>wostringstream</strong> to a function, is it possible the function to know if the stream is empty or if not and how long is it without doing a copy by calling <strong>.str()</strong>?</p>