C++ Locale Library - operator=



Description

It is used to copy locale and assigns x to the locale object, replacing its current value.

Declaration

Following is the declaration for std::locale::operator=

C++98

	
const locale& operator= (const locale& x) throw();

C++11

const locale& operator= (const locale& x) noexcept;

Parameters

x − locale object to copy.

Return Value

It returns *this.

Exceptions

No-throw guarantee − this member function never throws exceptions.

Data races

The locale object is modified.

locale.htm
Advertisements