From: Jonathan Wakely Date: Thu, 21 May 2020 00:03:27 +0000 (+0100) Subject: libstdc++: Use macro for nodiscard attribute X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a1baad8eb3a6f4604a64fdbc82a5f5144fa8be4;p=gcc.git libstdc++: Use macro for nodiscard attribute * include/experimental/socket (basic_socket::is_open() (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro. --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 975de44434b..65039d20b9e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2020-05-21 Jonathan Wakely + * include/experimental/socket (basic_socket::is_open() + (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro. + * include/experimental/bits/net.h (__endpoint, __protocol) (__acceptable_protocol, __inet_protocol): New concepts. (__detail::__is_endpoint): Move trait from . diff --git a/libstdc++-v3/include/experimental/socket b/libstdc++-v3/include/experimental/socket index 84d23ebe37c..c74aba6919b 100644 --- a/libstdc++-v3/include/experimental/socket +++ b/libstdc++-v3/include/experimental/socket @@ -725,7 +725,7 @@ inline namespace v1 native_handle_type release(error_code& __ec) { return __base::release(__ec); } - [[__nodiscard__]] bool + _GLIBCXX_NODISCARD bool is_open() const noexcept { return __base::is_open(); } void close() { close(__throw_on_error{"basic_socket::close"}); } @@ -1918,7 +1918,7 @@ inline namespace v1 native_handle_type release(error_code& __ec) { return __base::release(__ec); } - [[__nodiscard__]] bool + _GLIBCXX_NODISCARD bool is_open() const noexcept { return __base::is_open(); } void