Title
LWG 3498 seems to miss the non-member swap for basic_syncbuf
Status
c++23
Section
[syncstream.syncbuf.special]
Submitter
S. B. Tam

Created on 2021-10-07.00:00:00 last changed 13 months ago

Messages

Date: 2022-02-11.11:26:04

Proposed resolution:

This wording is relative to N4892.

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

    template<class charT, class traits, class Allocator>
      void swap(basic_syncbuf<charT, traits, Allocator>& a,
                basic_syncbuf<charT, traits, Allocator>& b) noexcept;
    

    -1- Effects: Equivalent to a.swap(b).

Date: 2022-02-15.00:00:00

[ 2022-02-10; Jens comments ]

The desired fix was applied editorially while applying

P2450 C++ Standard Library Issues to be moved in Virtual Plenary, Oct. 2021

Date: 2022-02-10.00:00:00

[ 2022-02-10 Approved at February 2022 virtual plenary. Status changed: Tentatively Ready → WP. ]

Date: 2021-10-15.00:00:00

[ 2021-10-14; Reflector poll ]

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

Date: 2021-10-07.00:00:00

LWG 3498 fixes the inconsistent noexcept-specifiers for member functions of basic_syncbuf, but the proposed resolution in LWG 3498 seems to miss the non-member swap, which also has inconsistent noexcept-specifier: [syncstream.syncbuf.special] says it's noexcept, while [syncstream.syn] says it's not.

Since the non-member swap and the member swap have equivalent effect, and LWG 3498 removes noexcept from the latter, I think it's pretty clear that the former should not be noexcept.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2022-02-11 11:26:04adminsetmessages: + msg12369
2022-02-10 12:58:57adminsetmessages: + msg12353
2022-02-10 12:58:57adminsetstatus: ready -> wp
2021-10-14 11:35:22adminsetmessages: + msg12152
2021-10-14 11:35:22adminsetstatus: new -> ready
2021-10-10 10:43:25adminsetmessages: + msg12104
2021-10-07 00:00:00admincreate