How can I get the length in bytes of a stringstream.
stringstream.str().length(); would copy the contents into std::string. I don't want to make a copy.
Or if anyone can suggest another iostream that works in memory, can be passed off for writing to another ostream, and can get the size of it easily I'll use that.
stringstreamis empty or not may find it easier to checkss.peek() != decltype(ss)::traits_type::eof().