# std::locale::operator=

From cppreference.com
< cpp‎ | locale‎ | locale

Defined in header `<locale>` |  |
const locale& operator=( const locale& other ); |  |

Creates a copy of `other`, replacing the contents of *this. The reference counts of all facets held by `other` are incremented. The reference counts of all facets previously held by *this are decremented, and those facets whose reference count becomes zero are deleted.

### Return value

Returns *this, which is now a copy of `other`.

### Exceptions

(none) | (until C++11)
`noexcept` specification: noexcept | (since C++11)

### Example

| This section is incomplete Reason: no example

### See also

(constructor) | constructs a new locale (public member function)

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/locale/locale/operator%3D&oldid=91472"
Categories:

- unconditionally noexcept
- Todo no example

Hidden categories:

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