https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123100
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- https://en.cppreference.com/w/cpp/io/basic_ostringstream/str.html 3) Returns a string move-constructed from the underlying string. Equivalent to return std::move(*rdbuf()).str();. I think this is the correct behavior.
