public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc(refs/users/meissner/heads/ieee3)] libstdc++: Use macro for nodiscard attribute
Date: Tue, 26 May 2020 18:12:27 +0000 (GMT)	[thread overview]
Message-ID: <20200526181227.A84033851C0C@sourceware.org> (raw)

https://gcc.gnu.org/g:0a1baad8eb3a6f4604a64fdbc82a5f5144fa8be4

commit 0a1baad8eb3a6f4604a64fdbc82a5f5144fa8be4
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu May 21 01:03:27 2020 +0100

    libstdc++: Use macro for nodiscard attribute
    
            * include/experimental/socket (basic_socket::is_open()
            (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.

Diff:
---
 libstdc++-v3/ChangeLog                   | 3 +++
 libstdc++-v3/include/experimental/socket | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

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  <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 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


                 reply	other threads:[~2020-05-26 18:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200526181227.A84033851C0C@sourceware.org \
    --to=meissner@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).