* [PATCH] PR libstdc++/80493 fix invalid exception specification
@ 2017-04-24 12:03 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2017-04-24 12:03 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-24 11:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 12:03 [PATCH] PR libstdc++/80493 fix invalid exception specification Jonathan Wakely
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).