Title
packaged_task and type-erased allocators
Status
c++17
Section
[futures.task]
Submitter
United States

Created on 2017-02-03.00:00:00 last changed 81 months ago

Messages

Date: 2017-03-03.22:19:58

Proposed resolution:

This wording is relative to N4618.

  1. Modify [futures.task] as follows:

    Strike

    
    template <class F, class Allocator>
    packaged_task(allocator_arg_t, const Allocator& a, F&& f);
    

    from the class definition in p2, and from [futures.task.members] p2.

  2. Modify [futures.task.members]/3:

    Remarks: These constructorsThis constructor shall not participate in overload resolution if decay_t<F> is the same type as packaged_task<R(ArgTypes...)>.
  3. Strike the last sentence of [futures.task.members]/4:

    The constructors that take an Allocator argument use it to allocate memory needed to store the internal data structures.
Date: 2017-03-03.22:19:58

[ Kona 2017-03-02 ]

Accepted as Immediate to resolve NB comment.

Date: 2017-02-05.14:47:36
Addresses US 165

The constructor that type-erases an allocator has all of the problems of the similar function constructor that was removed for this CD. This constructor from packaged_task should similarly be removed as well. If we prefer to keep this constructor, the current wording is underspecified, as the Allocator argument is not required to be type satisfying the Allocator requirements, nor is allocator_traits used.

Proposed change:

Strike

template <class F, class Allocator>
packaged_task(allocator_arg_t, const Allocator& a, F&& f);

from the class definition in p2, and from 30.6.9.1 [futures.task.members] p2. Strike the last sentence of 30.6.9.1p4. In p3, revise "These constructors" to "This constructor"

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2017-03-05 23:46:08adminsetstatus: immediate -> wp
2017-03-03 22:19:58adminsetmessages: + msg9075
2017-03-03 22:19:58adminsetstatus: new -> immediate
2017-02-04 05:44:09adminsetmessages: + msg8918
2017-02-03 00:00:00admincreate