libstdc++: Fix net::basic_socket::close(error_code&)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 20 May 2020 23:59:55 +0000 (00:59 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 20 May 2020 23:59:55 +0000 (00:59 +0100)
commitd9d34449bbde21f6092153828d1b6ee73bd6c4c3
treeeeb7125451ca0820a0f8705871eb18d0fc30c8c7
parentf26e72d8310c3e70f7a4b345e06a9c5c8d51728a
libstdc++: Fix net::basic_socket::close(error_code&)

Also add some missing member functions, nodiscard attributes, and
noexcept-specifiers.

* include/experimental/executor (use_future_t::use_future_t()): Fix
incorrect noexcept-specifier.
* include/experimental/internet (basic_resolver_results): Adjust
whitespace.
* include/experimental/socket (__basic_socket_impl::release): Add
member function.
(basic_socket(io_context&, const endpoint_type&)): Fix argument to
target constructor.
(basic_socket::release(), basic_socket::release(error_code&)): Add
missing member functions.
(basic_socket::is_open()): Add nodiscard attribute.
(basic_socket::close(error_code&)): Pass argument to base function.
(basic_socket_acceptor::release())
(basic_socket_acceptor::release(error_code&)): Add missing member
functions.
(basic_socket_acceptor::is_open()): Add nodiscard attribute.
(basic_socket_streambuf::error()): Add noexcept.
(basic_socket_iostream::error()): Likewise.
* testsuite/experimental/net/socket/basic_socket.cc: New test.
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/executor
libstdc++-v3/include/experimental/internet
libstdc++-v3/include/experimental/socket
libstdc++-v3/testsuite/experimental/net/socket/basic_socket.cc [new file with mode: 0644]