From: Jonathan Wakely Date: Mon, 14 Nov 2016 03:44:53 +0000 (+0000) Subject: Make std::future::share() noexcept (LWG 2556) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c52cc0189659e70155ab6ace4dc498bbf9d2142;p=gcc.git Make std::future::share() noexcept (LWG 2556) * include/std/future (future::share(), future::share()) (future::share()): Add noexcept, as per LWG 2556. From-SVN: r242374 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c8cbb2c29f7..71af4dc8d57 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2016-11-14 Jonathan Wakely + + * include/std/future (future::share(), future::share()) + (future::share()): Add noexcept, as per LWG 2556. + 2016-11-13 Jonathan Wakely PR libstdc++/78326 diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index cb42830aa9c..8ba13069510 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -778,7 +778,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return std::move(this->_M_get_result()._M_value()); } - shared_future<_Res> share(); + shared_future<_Res> share() noexcept; }; /// Partial specialization for future @@ -821,7 +821,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return this->_M_get_result()._M_get(); } - shared_future<_Res&> share(); + shared_future<_Res&> share() noexcept; }; /// Explicit specialization for future @@ -864,7 +864,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION this->_M_get_result(); } - shared_future share(); + shared_future share() noexcept; }; @@ -1004,18 +1004,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_state(std::move(__uf._M_state)) { } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2556. Wide contract for future::share() template inline shared_future<_Res> - future<_Res>::share() + future<_Res>::share() noexcept { return shared_future<_Res>(std::move(*this)); } template inline shared_future<_Res&> - future<_Res&>::share() + future<_Res&>::share() noexcept { return shared_future<_Res&>(std::move(*this)); } inline shared_future - future::share() + future::share() noexcept { return shared_future(std::move(*this)); } /// Primary template for promise