WG21-N4928 [syncstream.osyncstream.overview] depicts basic_osyncstream& operator=(basic_osyncstream&&) noexcept;. However, it also depicts an exposition-only data member syncbuf_type sb; and [syncstream.syncbuf.assign] depicts basic_syncbuf& operator=(basic_syncbuf&& rhs); which is not noexcept (it calls emit()).
Our current implementation:
|
basic_osyncstream& operator=(basic_osyncstream&&) noexcept = default;
|
|
private:
|
|
syncbuf_type _Sync_buf;
|
|
basic_syncbuf& operator=(basic_syncbuf&& _Right) {
|
|
emit();
|
It seems to me that there's an LWG issue here, and that operator=(basic_osyncstream&&) should not be marked noexcept in the Standard (and in our implementation).
Programmer-archaeology: LWG-3498 "Inconsistent noexcept-specifiers for basic_syncbuf" (already merged into the WP) removed noexcept from operator=(basic_syncbuf&&) because it calls emit(). It seems to me that operator=(basic_osyncstream&&) was simply missed at that time.
Noticed while reviewing #3314.
WG21-N4928 [syncstream.osyncstream.overview] depicts
basic_osyncstream& operator=(basic_osyncstream&&) noexcept;. However, it also depicts an exposition-only data membersyncbuf_type sb;and [syncstream.syncbuf.assign] depictsbasic_syncbuf& operator=(basic_syncbuf&& rhs);which is notnoexcept(it callsemit()).Our current implementation:
STL/stl/inc/syncstream
Line 348 in fbed7ea
STL/stl/inc/syncstream
Lines 371 to 372 in fbed7ea
STL/stl/inc/syncstream
Lines 109 to 110 in fbed7ea
It seems to me that there's an LWG issue here, and that
operator=(basic_osyncstream&&)should not be markednoexceptin the Standard (and in our implementation).Programmer-archaeology: LWG-3498 "Inconsistent
noexcept-specifiers forbasic_syncbuf" (already merged into the WP) removednoexceptfromoperator=(basic_syncbuf&&)because it callsemit(). It seems to me thatoperator=(basic_osyncstream&&)was simply missed at that time.Noticed while reviewing #3314.