From 12dabb45c7315f02f2cad94bda1eaef8cb752bb0 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 8 Aug 2018 16:40:51 +0100 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/std/future | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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; -- 2.47.2