[gcc r13-8303] libstdc++: Remove noexcept from std::osyncstream::operator=

Jonathan Wakely redi@gcc.gnu.org
Thu Feb 8 15:50:48 GMT 2024


https://gcc.gnu.org/g:2dcf47ce0204a08b724cd5b637e9e8d281e3abbb

commit r13-8303-g2dcf47ce0204a08b724cd5b637e9e8d281e3abbb
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Feb 1 21:23:27 2024 +0000

    libstdc++: Remove noexcept from std::osyncstream::operator=
    
    This should not be noexcept because its _M_syncbuf member has a
    potentially-throwing move assignment operator. The noexcept was removed
    by LWG 3867.
    
    libstdc++-v3/ChangeLog:
    
            * include/std/syncstream (basic_osyncstream::operator=): Remove
            noexcept, as per LWG 3867.
    
    (cherry picked from commit 67f5a8c802463228da7c7bb2ab100095217560a6)

Diff:
---
 libstdc++-v3/include/std/syncstream | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/std/syncstream b/libstdc++-v3/include/std/syncstream
index 3788b71ecddc..19cb581b7daa 100644
--- a/libstdc++-v3/include/std/syncstream
+++ b/libstdc++-v3/include/std/syncstream
@@ -286,7 +286,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       ~basic_osyncstream() = default;
 
-      basic_osyncstream& operator=(basic_osyncstream&&) noexcept = default;
+      basic_osyncstream& operator=(basic_osyncstream&&) = default;
 
       syncbuf_type* rdbuf() const noexcept
       { return const_cast<syncbuf_type*>(&_M_syncbuf); }


More information about the Libstdc++-cvs mailing list