1090. Missing description of packaged_task member swap, missing non-member swap

Section: 33.6.10 [futures.task] Status: Resolved Submitter: Daniel Krügler Opened: 2009-03-22 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [futures.task].

View all issues with Resolved status.


Class template packaged_task in 33.6.10 [futures.task] shows a member swap declaration, but misses to document it's effects (No prototype provided). Further on this class misses to provide a non-member swap.

[ Batavia (2009-05): ]

Alisdair notes that paragraph 2 of the proposed resolution has already been applied in the current Working Draft.

We note a pending future-related paper by Detlef; we would like to wait for this paper before proceeding.

Move to Open.

[ 2009-05-24 Daniel removed part 2 of the proposed resolution. ]

[ 2009-10 post-Santa Cruz: ]

Move to Tentatively Ready, removing bullet 3 from the proposed resolution but keeping the other two bullets.

[ 2010 Pittsburgh: ]

Moved to NAD EditorialResolved. Rationale added below.


Solved by N3058.

Proposed resolution:

  1. In 33.6.10 [futures.task], immediately after the definition of class template packaged_task add:

    template<class R, class... Argtypes>
    void swap(packaged_task<R(ArgTypes...)>&, packaged_task<R(ArgTypes...)>&);
  2. At the end of 33.6.10 [futures.task] (after p. 20), add the following prototype description:

    template<class R, class... Argtypes>
    void swap(packaged_task<R(ArgTypes...)>& x, packaged_task<R(ArgTypes...)>& y);

    Effects: x.swap(y)

    Throws: Nothing.