public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [PATCH] PR libstdc++/80493 fix invalid exception specification
Date: Mon, 24 Apr 2017 12:03:00 -0000	[thread overview]
Message-ID: <20170424113859.GA8084@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

This was fixed for std::optional, but not the TS version, so Clang
rejects it.

	PR libstdc++/80493
	* include/experimental/optional (optional::swap): Fix exception
	specification.

Tested powerpc64le-linux, committed to trunk.



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 850 bytes --]

commit 1d7d6db208e6371f00f8aecd77eb1a78a6fbe578
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Apr 24 12:15:13 2017 +0100

    PR libstdc++/80493 fix invalid exception specification
    
    	PR libstdc++/80493
    	* include/experimental/optional (optional::swap): Fix exception
    	specification.

diff --git a/libstdc++-v3/include/experimental/optional b/libstdc++-v3/include/experimental/optional
index 197a1fc..4a1e71d 100644
--- a/libstdc++-v3/include/experimental/optional
+++ b/libstdc++-v3/include/experimental/optional
@@ -690,7 +690,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       void
       swap(optional& __other)
       noexcept(is_nothrow_move_constructible<_Tp>()
-               && noexcept(swap(declval<_Tp&>(), declval<_Tp&>())))
+               && __is_nothrow_swappable<_Tp>::value)
       {
         using std::swap;
 

                 reply	other threads:[~2017-04-24 11:39 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=20170424113859.GA8084@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@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).