aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-05-21 01:03:27 +0100
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:03:59 -0300
commitdfd8e696c43b7f45887f639e564dabf1e54aed96 (patch)
tree7242fef4f4e04c3090011c19ff32f5e4d4f449b0
parent0c9fc309c45a520c02af037464d74cc956ac536c (diff)
downloadgcc-dfd8e696c43b7f45887f639e564dabf1e54aed96.zip
gcc-dfd8e696c43b7f45887f639e564dabf1e54aed96.tar.gz
gcc-dfd8e696c43b7f45887f639e564dabf1e54aed96.tar.bz2
libstdc++: Use macro for nodiscard attribute
* include/experimental/socket (basic_socket::is_open() (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
-rw-r--r--libstdc++-v3/ChangeLog3
-rw-r--r--libstdc++-v3/include/experimental/socket4
2 files changed, 5 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 975de44..65039d2 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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>.
diff --git a/libstdc++-v3/include/experimental/socket b/libstdc++-v3/include/experimental/socket
index 84d23eb..c74aba6 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