I use std::stringstream extensively to construct strings and error messages in my application. The stringstreams are usually very short life automatic variables.
Will such usage cause heap reallocation for every variable?
Should I switch from temporary to class-member stringstream variable?
In latter case how can I reserve stringstream buffer (init it with large enough string or there's more elegant method?)?
Thanks.