diff options
author | Jonathan Wakely <jwakely.gcc@gmail.com> | 2013-03-16 02:48:06 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2013-03-16 02:48:06 +0000 |
commit | aaad548e18f57f1af985bce7e9bed143c02f2261 (patch) | |
tree | 46b4804fbfae19bc420f6e418eaca811c77bfad1 /gcc | |
parent | b5e1443a6542d749ac3df1730667276ce8141e13 (diff) | |
download | gcc-aaad548e18f57f1af985bce7e9bed143c02f2261.zip gcc-aaad548e18f57f1af985bce7e9bed143c02f2261.tar.gz gcc-aaad548e18f57f1af985bce7e9bed143c02f2261.tar.bz2 |
re PR libstdc++/56492 (std::packaged_task requires CopyConstructible stored task)
PR libstdc++/56492
* include/std/future (__future_base::_Result): Add result_type
typedef.
(__future_base::_S_allocate_result): Overload for std::allocator.
(__future_base::_Task_setter): Use _Result::result_type instead of
deducing the type from the task.
(__future_base::_Task_state): Store allocator to allow shared state
to be reset. Replace std::function with member of target object type
accessed via ...
(__future_base::_Task_state_base): New abstract base class.
(__future_base::_Task_state_base::_M_run): New virtual function to
invoke type-erased target object.
(__future_base::_Task_state_base::_M_reset): New virtual function to
create new shared_state using same target object and allocator.
(__future_base::__create_task_state): Allocate a new _Task_state.
(packaged_task::packaged_task): Use __create_task_state.
(packaged_task::reset): Use _Task_state_base::_M_reset.
* testsuite/30_threads/packaged_task/cons/56492.cc: New.
From-SVN: r196695
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions