Title
Inconsistent noexcept-specifiers for basic_syncbuf
Status
c++23
Section
[syncstream.syncbuf.overview][syncstream.syncbuf.assign]
Submitter
Jonathan Wakely

Created on 2020-11-10.00:00:00 last changed 13 months ago

Messages

Date: 2021-10-14.09:56:08

Proposed resolution:

This wording is relative to N4885.

  1. Modify [syncstream.syncbuf.assign] as indicated:

    basic_syncbuf& operator=(basic_syncbuf&& rhs) noexcept;
    

    -1- Effects: […]

    -2- Postconditions: […]

    -3- Returns: […]

    -4- Remarks: […]

    void swap(basic_syncbuf& other) noexcept;
    

    -5- Preconditions: […]

    -6- Effects: […]

Date: 2021-10-14.00:00:00

[ 2021-10-14 Approved at October 2021 virtual plenary. Status changed: Voting → WP. ]

Date: 2021-06-15.00:00:00

[ 2021-06-23; Reflector poll ]

Set status to Tentatively Ready after eight votes in favour during reflector poll.

Date: 2021-05-22.00:00:00

[ 2021-05-22 Tim adds PR ]

The move assignment is specified to call emit() which can throw, and there's nothing in the wording providing for catching/ignoring the exception, so it can't be noexcept. The swap needs to call basic_streambuf::swap, which isn't noexcept, so it shouldn't be noexcept either.

Date: 2020-11-15.00:00:00

[ 2020-11-21; Reflector prioritization ]

Set priority to 3 during reflector discussions.

Date: 2020-11-10.00:00:00

The synopsis in [syncstream.syncbuf.overview] shows the move assignment operator and swap member as potentially throwing. The detailed descriptions in [syncstream.syncbuf.assign] are noexcept.

Daniel:

This mismatch is already present in the originally accepted paper P0053R7, so this is nothing that could be resolved editorially.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2021-10-14 09:56:08adminsetmessages: + msg12121
2021-10-14 09:56:08adminsetstatus: voting -> wp
2021-09-29 12:57:28adminsetstatus: ready -> voting
2021-06-23 14:16:45adminsetmessages: + msg11958
2021-06-23 14:16:45adminsetstatus: new -> ready
2021-05-22 16:14:55adminsetmessages: + msg11840
2021-05-22 16:14:55adminsetmessages: + msg11839
2020-11-21 14:06:16adminsetmessages: + msg11624
2020-11-10 00:00:00admincreate