##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::basic_regex::swap

From cppreference.com
< cpp‎ | regex‎ | basic regex

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

Exchanges the contents of two regular expressions.

### [edit] Parameters

other | - | the regular expression 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::basic_regex) (C++11) | specializes the std::swap algorithm (function template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/regex/basic_regex/swap&oldid=91420"
Categories:

- unconditionally noexcept
- Todo no example

Hidden categories:

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