From a930324dabd41a76ef141a85a7d0cc7fc9c9c0b3 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 16 Nov 2017 14:39:41 +0000 Subject: [PATCH] Add noexcept to std::shared_future copy operations (LWG DR 2799) * include/std/future (shared_future): Add noexcept to copy constructor and copy-assignment operator (LWG 2799). From-SVN: r254821 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/std/future | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 99bfbbad707..4be76143b5c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2017-11-16 Jonathan Wakely + + * include/std/future (shared_future): Add noexcept to copy constructor + and copy-assignment operator (LWG 2799). + 2017-11-15 Jason Merrill * include/std/numeric (gcd): Fix typo. diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index 73d5a60a918..d9d446bc2f6 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -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; -- 2.30.2