##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::any::swap

From cppreference.com
< cpp‎ | utility‎ | any

void swap(any& other); |  | (since C++17)

Swaps the content of two `any` objects.

### [edit] Parameters

other | - | object to swap with

### [edit] Return value

(none)

### [edit] Exceptions

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

- unconditionally noexcept

Hidden categories:

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