Created on 2023-01-29.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4928.
Modify [syncstream.osyncstream.overview] as indicated:
namespace std { template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>> class basic_osyncstream : public basic_ostream<charT, traits> { public: […] using syncbuf_type = basic_syncbuf<charT, traits, Allocator>; […] // assignment basic_osyncstream& operator=(basic_osyncstream&&)noexcept; […] private: syncbuf_type sb; // exposition only }; }
[ 2023-02-13 Approved at February 2023 meeting in Issaquah. Status changed: Voting → WP. ]
[ 2023-02-06; Reflector poll ]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
The synopsis of std::basic_osyncstream ([syncstream.osyncstream.overview]) indicates that it's member functions behave as if it hold a std::basic_syncbuf as its subobject, and according to [functions.within.classes], std::basic_osyncstream's move assignment operator should call std::basic_syncbuf's move assignment operator.
However, currently std::basic_osyncstream's move assignment operator is noexcept, while std::basic_syncbuf's is not. So when an exception is thrown from move assignment between std::basic_syncbuf objects, std::terminate should be called. It's clarified in LWG 3498 that an exception can escape from std::basic_syncbuf's move assignment operator. Is there any reason that an exception shouldn't escape from std::basic_osyncstream's move assignment operator?History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2023-02-13 10:17:57 | admin | set | messages: + msg13376 |
2023-02-13 10:17:57 | admin | set | status: voting -> wp |
2023-02-06 15:33:48 | admin | set | status: ready -> voting |
2023-02-06 15:13:50 | admin | set | messages: + msg13268 |
2023-02-06 15:13:50 | admin | set | status: new -> ready |
2023-01-29 12:22:38 | admin | set | messages: + msg13233 |
2023-01-29 00:00:00 | admin | create |