PR libstdc++/80493 fix invalid exception specification
authorJonathan Wakely <jwakely@redhat.com>
Mon, 24 Apr 2017 11:40:02 +0000 (12:40 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 24 Apr 2017 11:40:02 +0000 (12:40 +0100)
PR libstdc++/80493
* include/experimental/optional (optional::swap): Fix exception
specification.

From-SVN: r247093

libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/optional

index bd43faa6c6d2ad502d258e2a85e8683723d71e6c..6330a49097219723c79a71864e4156a98694e54e 100644 (file)
@@ -1,3 +1,9 @@
+2017-04-24  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/80493
+       * include/experimental/optional (optional::swap): Fix exception
+       specification.
+
 2017-04-21  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/80316
index 197a1fc7691229a78a643b1357c8d02501d8ab2b..4a1e71d4234f2bce3be08f1da528736cad79fe5e 100644 (file)
@@ -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;