Title
packaged_task constructors need review
Status
c++11
Section
[futures.task.members]
Submitter
INCITS

Created on 2010-08-25.00:00:00 last changed 154 months ago

Messages

Date: 2011-02-20.22:39:32

Proposed resolution:

Alter the list of constructors in both [futures.task] and in [futures.task.members] as indicated:

template <class F>
explicit packaged_task(F f);
template <class F, class Allocator>
explicit packaged_task(allocator_arg_t, const Allocator& a, F f);
explicit packaged_task(R(*f)(ArgTypes...));
template <class F>
explicit packaged_task(F&& f);
template <class F, class Allocator>
explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f);
Date: 2011-02-10.00:00:00

[ 2011-02-10 Reflector discussion ]

Moved to Tentatively Ready after 5 votes.

Date: 2010-10-22.00:00:00

[ 2010-10-22 Howard provides wording, as requested by the LWG in Rapperswil. ]

Date: 2010-10-23.01:45:06

[ US-207 Suggested Resolution: ]

Review the constructors for packaged_task and provide the same ones as function, except where inappropriate.

Date: 2010-10-23.01:45:06

Addresses US-207

The constructor that takes R(*)(ArgTypes...) is not needed; the constructor that takes a callable type works for this argument type. More generally, the constructors for packaged_task should parallel those for function.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2011-04-11 11:23:23adminsetstatus: voting -> wp
2011-03-05 15:24:28adminsetstatus: ready -> voting
2011-02-10 22:08:53adminsetmessages: + msg5479
2011-02-10 22:08:53adminsetstatus: open -> ready
2010-10-23 01:45:06adminsetmessages: + msg4891
2010-10-23 01:45:06adminsetmessages: + msg4890
2010-10-23 01:45:06adminsetmessages: + msg4889
2010-10-23 01:45:06adminsetmessages: + msg4888
2010-08-25 00:00:00admincreate