This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

1300. Circular definition of promise::swap

Section: 33.10.6 [futures.promise] Status: Resolved Submitter: Jonathan Wakely Opened: 2009-12-26 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [futures.promise].

View all other issues in [futures.promise].

View all issues with Resolved status.

Discussion:

33.10.6 [futures.promise]/12 defines the effects of promise::swap(promise&) as

void swap(promise& other);

12 Effects: swap(*this, other)

and 33.10.6 [futures.promise]/25 defines swap(promise<R&>, promise<R>&) as

template <class R>
  void swap(promise<R>& x, promise<R>& y);

25 Effects: x.swap(y).

[ 2010-01-13 Daniel added "Throws: Nothing." ]

[ 2010-01-14 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]

[ 2010 Pittsburgh: ]

Moved to NAD EditorialResolved. Rationale added below.

Rationale:

Solved by N3058.

Proposed resolution:

Change 33.10.6 [futures.promise] paragraph 12

void swap(promise& other);

12 Effects: swap(*this, other) Exchanges the associated states of *this and other.

13 ...

Throws: Nothing.