std::promise::swap - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::promise::swap

From cppreference.com
< cpp‎ | thread‎ | promise

void swap( promise& other ); |  | (since C++11)

Exchanges the shared states of two promise objects.

### [edit] Parameters

other | - | the promise to swap with

### [edit] Return value

(none)

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

std::swap(std::promise) (C++11) | specializes the std::swap algorithm (function template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/thread/promise/swap&oldid=63462"
Categories:

- unconditionally noexcept
- Todo no example