]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add noexcept to std::shared_future copy operations (LWG DR 2799)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 8 Aug 2018 15:40:51 +0000 (16:40 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 8 Aug 2018 15:40:51 +0000 (16:40 +0100)
Backport from mainline
2017-11-16  Jonathan Wakely  <jwakely@redhat.com>

* include/std/future (shared_future): Add noexcept to copy constructor
and copy-assignment operator (LWG 2799).

From-SVN: r263422

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

index 751797110ebe4b56ec305f0fdc7962450a79b723..160ed577a322e47effed26ae65bbf1efca4935de 100644 (file)
@@ -1,5 +1,11 @@
 2018-08-08  Jonathan Wakely  <jwakely@redhat.com>
 
+       Backport from mainline
+       2017-11-16  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/future (shared_future): Add noexcept to copy constructor
+       and copy-assignment operator (LWG 2799).
+
        Backport from mainline
        2017-06-17  Jonathan Wakely  <jwakely@redhat.com>
 
index 830494f1904104f9b295ea83d3502eb541e942c4..17bd821318a8fd06e9f1900b3faa0ba7cf98ed26 100644 (file)
@@ -885,7 +885,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
@@ -897,7 +897,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;