From: Jonathan Wakely Date: Wed, 8 Aug 2018 15:40:51 +0000 (+0100) Subject: Add noexcept to std::shared_future copy operations (LWG DR 2799) X-Git-Tag: releases/gcc-6.5.0~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12dabb45c7315f02f2cad94bda1eaef8cb752bb0;p=thirdparty%2Fgcc.git Add noexcept to std::shared_future copy operations (LWG DR 2799) Backport from mainline 2017-11-16 Jonathan Wakely * include/std/future (shared_future): Add noexcept to copy constructor and copy-assignment operator (LWG 2799). From-SVN: r263422 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 751797110ebe..160ed577a322 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2018-08-08 Jonathan Wakely + Backport from mainline + 2017-11-16 Jonathan Wakely + + * include/std/future (shared_future): Add noexcept to copy constructor + and copy-assignment operator (LWG 2799). + Backport from mainline 2017-06-17 Jonathan Wakely diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index 830494f19041..17bd821318a8 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -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;