title: Should I preallocate std::stringstream?
body: <p>I use <code>std::stringstream</code> extensively to construct strings and error messages in my application. The <code>stringstreams</code> are usually very short life automatic variables.</p>
  
  <p>Will such usage cause heap reallocation for every variable? Should I switch from temporary to class-member <code>stringstream</code> variable?</p>
  
  <p>In latter case, how can I reserve <code>stringstream</code> buffer? (Should I initialize it with a large enough string or is there a more elegant method?)</p>