libstdc++: Use macro for nodiscard attribute
authorJonathan Wakely <jwakely@redhat.com>
Thu, 21 May 2020 00:03:27 +0000 (01:03 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 21 May 2020 00:03:27 +0000 (01:03 +0100)
* include/experimental/socket (basic_socket::is_open()
(basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.

libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/socket

index 975de44434bd4d3977ecceb4f506454f77bcb3bc..65039d20b9e956a2782cb888e9cd632b6e0152e5 100644 (file)
@@ -1,5 +1,8 @@
 2020-05-21  Jonathan Wakely  <jwakely@redhat.com>
 
+       * 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 <experimental/socket>.
index 84d23ebe37c16376a1d08daaaf2fdd417a728de4..c74aba6919b71bca2bd7c5afb89c910b531cd008 100644 (file)
@@ -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