Add noexcept to std::shared_future copy operations (LWG DR 2799)
authorJonathan Wakely <jwakely@redhat.com>
Thu, 16 Nov 2017 14:39:41 +0000 (14:39 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 16 Nov 2017 14:39:41 +0000 (14:39 +0000)
* include/std/future (shared_future): Add noexcept to copy constructor
and copy-assignment operator (LWG 2799).

From-SVN: r254821

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/future

index 99bfbbad707aa22745af51976f648b35461e665c..4be76143b5c35878ea1451232d4b93aeec046fed 100644 (file)
@@ -1,3 +1,8 @@
+2017-11-16  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/future (shared_future): Add noexcept to copy constructor
+       and copy-assignment operator (LWG 2799).
+
 2017-11-15  Jason Merrill  <jason@redhat.com>
 
        * include/std/numeric (gcd): Fix typo.
index 73d5a60a9183c32edfa5d9adf2e9ac372075596a..d9d446bc2f6513a2ddc38096d3e04231b414d69d 100644 (file)
@@ -896,7 +896,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       constexpr shared_future() noexcept : _Base_type() { }
 
       /// Copy constructor
-      shared_future(const shared_future& __sf) : _Base_type(__sf) { }
+      shared_future(const shared_future& __sf) noexcept : _Base_type(__sf) { }
 
       /// Construct from a future rvalue
       shared_future(future<_Res>&& __uf) noexcept
@@ -908,7 +908,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       : _Base_type(std::move(__sf))
       { }
 
-      shared_future& operator=(const shared_future& __sf)
+      shared_future& operator=(const shared_future& __sf) noexcept
       {
         shared_future(__sf)._M_swap(*this);
         return *this;