https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86643
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- Culprit is r262474 - "P0935R0 Eradicating unnecessarily explicit default constructors" Looking closer at the example, it doesn't use std::basic_ostringstream as advertised but: std::ostringstream buf2("test", std::ios_base::ate); The "std::ostringstream" is deprecated and replacing it by std::basic_ostringstream<char> buf2("test", std::ios_base::ate); works. The question is whether the patch intended to remove the deprecated support for std::ostringstream or not. If it did, I think that warrens an entry at https://gcc.gnu.org/gcc-9/changes.html ; if not, then it needs to be fixed. Cross ref: P0935R0 is http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html Patch causing the regression is https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00318.html