[PATCH] PR libstdc++/80493 fix invalid exception specification
Jonathan Wakely
jwakely@redhat.com
Mon Apr 24 11:39:00 GMT 2017
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.
-------------- next part --------------
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;
More information about the Libstdc++
mailing list