I\'ve tried several things already,
std::stringstream m; m.empty(); m.clear();
both of which don\'t work.
It's a conceptual problem.
Stringstream is a stream, so its iterators are forward, cannot return. In an output stringstream, you need a flush() to reinitialize it, as in any other output stream.