From 71f257f78e8b2568c76f226d665b890902453121 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 24 Apr 2017 12:40:02 +0100 Subject: [PATCH] PR libstdc++/80493 fix invalid exception specification PR libstdc++/80493 * include/experimental/optional (optional::swap): Fix exception specification. From-SVN: r247093 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/experimental/optional | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index bd43faa6c6d..6330a490972 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2017-04-24 Jonathan Wakely + + PR libstdc++/80493 + * include/experimental/optional (optional::swap): Fix exception + specification. + 2017-04-21 Jonathan Wakely PR libstdc++/80316 diff --git a/libstdc++-v3/include/experimental/optional b/libstdc++-v3/include/experimental/optional index 197a1fc7691..4a1e71d4234 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; -- 2.30.2