##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::function::swap

From cppreference.com
< cpp‎ | utility‎ | functional‎ | function

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

Exchanges the stored callable objects of *this and `other`.

### [edit] Parameters

other | - | function wrapper to exchange the stored callable object with

### [edit] Return value

(none)

### [edit] Exceptions

`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/function/swap&oldid=91852"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template