diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-08 01:06:27 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-08 01:06:27 +0000 |
commit | f0f9e088ce5e13214e2e3e8def5fdf66ec4de65d (patch) | |
tree | 6304a4d424ee75b046af4801b1577d04e968d415 /libstdc++-v3/include/std | |
parent | af1409adf40caa706b3d29ad2e29f41f88c840ed (diff) | |
download | gcc-f0f9e088ce5e13214e2e3e8def5fdf66ec4de65d.tar.gz |
* include/std/future: Enable allocator support.
* testsuite/30_threads/packaged_task/cons/alloc.cc: Expect PASS.
* testsuite/30_threads/promise/cons/alloc.cc: Expect PASS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r-- | libstdc++-v3/include/std/future | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index 803c912294e..0678093fe47 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -213,8 +213,6 @@ namespace std typedef unique_ptr<_Res, _Result_base::_Deleter> type; }; - // TODO: use when allocator_arg_t available - /* /// Result_alloc. template<typename _Res, typename _Alloc> struct _Result_alloc : _Result<_Res> @@ -255,7 +253,6 @@ namespace std } return typename _Ptr<__result_type>::type(__p); } - */ /// Shared state between a promise and one or more associated futures. @@ -843,14 +840,11 @@ namespace std _M_storage(std::move(__rhs._M_storage)) { } - // TODO: needs allocator_arg_t - /* template<typename _Allocator> promise(allocator_arg_t, const _Allocator& __a) : _M_future(std::allocate_shared<_State>(__a)), _M_storage(__future_base::_S_allocate_result<_Res>(__a)) { } - */ promise(const promise&) = delete; @@ -933,14 +927,11 @@ namespace std _M_storage(std::move(__rhs._M_storage)) { } - // TODO: needs allocator_arg_t - /* template<typename _Allocator> promise(allocator_arg_t, const _Allocator& __a) : _M_future(std::allocate_shared<_State>(__a)), _M_storage(__future_base::_S_allocate_result<_Res&>(__a)) { } - */ promise(const promise&) = delete; @@ -1012,14 +1003,11 @@ namespace std { } - // TODO: needs allocator_arg_t - /* template<typename _Allocator> promise(allocator_arg_t, const _Allocator& __a) : _M_future(std::allocate_shared<_State>(__a)), _M_storage(__future_base::_S_allocate_result<void>(__a)) { } - */ promise(const promise&) = delete; @@ -1088,11 +1076,8 @@ namespace std _M_future->_M_set_result(std::move(__setter)); } - // TODO: needs allocators - /* template<typename _Res, class Alloc> struct uses_allocator<promise<_Res>, Alloc> : true_type { }; - */ template<typename _StateT, typename _Res> @@ -1142,14 +1127,11 @@ namespace std : _M_result(new _Result<_Res>()), _M_task(std::move(__task)) { } - // TODO: needs allocator_arg_t - /* template<typename _Func, typename _Alloc> _Task_state(_Func&& __task, const _Alloc& __a) : _M_result(_S_allocate_result<_Res>(__a)) , _M_task(allocator_arg, __a, std::move(__task)) { } - */ void _M_run(_Args... __args) @@ -1208,14 +1190,11 @@ namespace std : _M_state(std::make_shared<_State_type>(__fn)) { } - // TODO: needs allocator_arg_t - /* template<typename _Fn, typename _Allocator> explicit packaged_task(allocator_arg_t __tag, const _Allocator& __a, _Fn __fn) : _M_state(std::allocate_shared<_State_type>(__a, std::move(__fn))) { } - */ ~packaged_task() { |