std::ostringstream::str() returns a temporary string object.
Do not reply on it after destroyed.