diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-10 00:39:37 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-10 00:39:37 +0000 |
commit | 5dc5dd562be14d257889759ab19298b19a9b4280 (patch) | |
tree | c895c7aae5494f1b1e01c98245aeb378689359c1 /libstdc++-v3 | |
parent | eef3b8bbb3d8dde5fea9c463b2edbaa11ed9d2f5 (diff) | |
download | gcc-5dc5dd562be14d257889759ab19298b19a9b4280.tar.gz |
* include/std/future (__future_base::_Setter::operator(),
__future_base::_Task_setter::operator()): Make call operators const.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218553 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 3 | ||||
-rw-r--r-- | libstdc++-v3/include/std/future | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 320a7617dea..48ba1ff96d7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -8,6 +8,9 @@ * include/bits/locale_facets_nonio.h (__timepunct::_M_cache): Remove unused declaration. + * include/std/future (__future_base::_Setter::operator(), + __future_base::_Task_setter::operator()): Make call operators const. + 2014-12-09 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/64203 diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index 157ceb3bffb..31aaf9877b7 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -455,7 +455,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION "Invalid specialisation"); // Used by std::promise to copy construct the result. - typename promise<_Res>::_Ptr_type operator()() + typename promise<_Res>::_Ptr_type operator()() const { _State_baseV2::_S_check(_M_promise->_M_future); _M_promise->_M_storage->_M_set(*_M_arg); @@ -470,7 +470,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Setter<_Res, _Res&&> { // Used by std::promise to move construct the result. - typename promise<_Res>::_Ptr_type operator()() + typename promise<_Res>::_Ptr_type operator()() const { _State_baseV2::_S_check(_M_promise->_M_future); _M_promise->_M_storage->_M_set(std::move(*_M_arg)); @@ -487,7 +487,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Setter<_Res, __exception_ptr_tag> { // Used by std::promise to store an exception as the result. - typename promise<_Res>::_Ptr_type operator()() + typename promise<_Res>::_Ptr_type operator()() const { _State_baseV2::_S_check(_M_promise->_M_future); _M_promise->_M_storage->_M_error = *_M_ex; @@ -1286,7 +1286,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<> struct __future_base::_State_base::_Setter<void, void> { - promise<void>::_Ptr_type operator()() + promise<void>::_Ptr_type operator()() const { _State_base::_S_check(_M_promise->_M_future); return std::move(_M_promise->_M_storage); @@ -1310,7 +1310,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __future_base::_Task_setter { // Invoke the function and provide the result to the caller. - _Ptr_type operator()() + _Ptr_type operator()() const { __try { @@ -1333,7 +1333,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Ptr_type, typename _Fn> struct __future_base::_Task_setter<_Ptr_type, _Fn, void> { - _Ptr_type operator()() + _Ptr_type operator()() const { __try { |