##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::match_results::operator=

From cppreference.com
< cpp‎ | regex‎ | match results

Defined in header `<regex>` |  |
match_results& operator=( const match_results& other ); | (1) | (since C++11)
match_results& operator=( match_results&& other ); | (2) | (since C++11)

Assigns the contents.

1) Copy assignment operator. Assigns the contents of `other`.
2) Move assignment operator. Assigns the contents of `other` using move semantics. `other` is in valid, but unspecified state after the operation.

### [edit] Parameters

other | - | another match results object

### [edit] Return value

*this.

### [edit] Exceptions

1) (none)
2)
`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/regex/match_results/operator%3D&oldid=91589"
Category:

- unconditionally noexcept

Hidden categories:

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