3002. [networking.ts] basic_socket_acceptor::is_open() isn't noexcept

Section: 99 [networking.ts::socket.acceptor.ops] Status: Tentatively Ready Submitter: Jonathan Wakely Opened: 2017-07-14 Last modified: 2017-11-01

Priority: 0

View all issues with Tentatively Ready status.

Discussion:

Addresses: networking.ts

basic_socket::is_open() is noexcept, but the corresponding function on basic_socket_acceptor is not. This is a simple observer with a wide contract and cannot fail.

[ 2017-11-01 Moved to Tentatively Ready after 7 positive votes for P0 on c++std-lib. ]

Proposed resolution:

This resolution is relative to N4656.

  1. Edit [networking.ts::socket.acceptor], class template basic_socket_acceptor synopsis, as indicated:

    template<class AcceptableProtocol> 
    class basic_socket_acceptor {
    public:
      […]
      bool is_open() const noexcept;
      […]
    };
    
  2. Edit 99 [networking.ts::socket.acceptor.ops] as indicated:

    bool is_open() const noexcept;
    

    -10- Returns: A bool indicating whether this acceptor was opened by a previous call to open or assign.