+2016-11-14 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/future (future::share(), future<R&>::share())
+ (future<void>::share()): Add noexcept, as per LWG 2556.
+
2016-11-13 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/78326
return std::move(this->_M_get_result()._M_value());
}
- shared_future<_Res> share();
+ shared_future<_Res> share() noexcept;
};
/// Partial specialization for future<R&>
return this->_M_get_result()._M_get();
}
- shared_future<_Res&> share();
+ shared_future<_Res&> share() noexcept;
};
/// Explicit specialization for future<void>
this->_M_get_result();
}
- shared_future<void> share();
+ shared_future<void> share() noexcept;
};
: _M_state(std::move(__uf._M_state))
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2556. Wide contract for future::share()
template<typename _Res>
inline shared_future<_Res>
- future<_Res>::share()
+ future<_Res>::share() noexcept
{ return shared_future<_Res>(std::move(*this)); }
template<typename _Res>
inline shared_future<_Res&>
- future<_Res&>::share()
+ future<_Res&>::share() noexcept
{ return shared_future<_Res&>(std::move(*this)); }
inline shared_future<void>
- future<void>::share()
+ future<void>::share() noexcept
{ return shared_future<void>(std::move(*this)); }
/// Primary template for promise