https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123100

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <[email protected]>:

https://gcc.gnu.org/g:a94bd31fd80b6a7efbe4d4c81ff195f7d81c3813

commit r16-6556-ga94bd31fd80b6a7efbe4d4c81ff195f7d81c3813
Author: Jonathan Wakely <[email protected]>
Date:   Mon Dec 15 10:25:52 2025 +0000

    libstdc++: Fix std::basic_stringbuf::str()&& [PR123100]

    When basic_stringbuf::setbuf has been called we need to copy the
    contents of the buffer into _M_string first, before returning that.

    libstdc++-v3/ChangeLog:

            PR libstdc++/123100
            * include/std/sstream (basic_stringbuf::str()&&): Handle the
            case where _M_string is not being used for the buffer.
            * testsuite/27_io/basic_stringbuf/str/char/123100.cc: New test.

    Reviewed-by: Tomasz KamiÅski <[email protected]>

Reply via email to