This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.

3253. basic_syncbuf::basic_syncbuf() should not be explicit

Section: 29.10.2.1 [syncstream.syncbuf.overview] Status: WP Submitter: Nevin Liber Opened: 2019-08-06 Last modified: 2019-11-19

Priority: 0

View all issues with WP status.

Discussion:

When P0935 "Eradicating unnecessarily explicit default constructors from the standard library" was applied, basic_syncbuf was not in the working paper. basic_syncbuf should not have an explicit default constructor.

[2019-09-02 Issue Prioritization]

Status to Tentatively Ready and priority to 0 after seven positive votes on the reflector.

Proposed resolution:

This wording is relative to N4830.

  1. Modify 29.10.2.1 [syncstream.syncbuf.overview], class template basic_syncbuf synopsis, as indicated:

    template<class charT, class traits, class Allocator>
    class basic_syncbuf : public basic_streambuf<charT, traits> {
    public:
      […]
      // 29.10.2.2 [syncstream.syncbuf.cons], construction and destruction
      basic_syncbuf()
        : basic_syncbuf(nullptr) {}
      explicit basic_syncbuf(streambuf_type* obuf = nullptr)
        : basic_syncbuf(obuf, Allocator()) {}
      […]
    };