Add noexcept to std::shared_future copy operations (LWG DR 2799)

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: r255327
This commit is contained in:
Jonathan Wakely 2017-12-01 17:12:15 +00:00 committed by Jonathan Wakely
parent c210258bae
commit 32d94e772e
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
2017-12-01 Jonathan Wakely <jwakely@redhat.com> 2017-12-01 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 Backport from mainline
2017-11-15 Jonathan Wakely <jwakely@redhat.com> 2017-11-15 Jonathan Wakely <jwakely@redhat.com>

View File

@ -896,7 +896,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr shared_future() noexcept : _Base_type() { } constexpr shared_future() noexcept : _Base_type() { }
/// Copy constructor /// 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 /// Construct from a future rvalue
shared_future(future<_Res>&& __uf) noexcept shared_future(future<_Res>&& __uf) noexcept
@ -908,7 +908,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _Base_type(std::move(__sf)) : _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); shared_future(__sf)._M_swap(*this);
return *this; return *this;