I\'ve tried several things already,
std::stringstream m; m.empty(); m.clear();
both of which don\'t work.
You can clear the error state and empty the stringstream all in one line
std::stringstream().swap(m); // swap m with a default constructed stringstream
This effectively resets m to a default constructed state