Namespaces
Variants
Views
Actions

std::locale::operator==, operator!=

From cppreference.com
< cpp‎ | locale‎ | locale
Revision as of 22:54, 18 October 2024 by D41D8CD98F (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
std::locale
Member types
Member functions
locale::operator==locale::operator!=
(until C++20)
Static member functions
 
bool operator==( const locale& other ) const;
(1)
bool operator!=( const locale& other ) const;
(2) (until C++20)

Tests two locales for equality. Named locales are considered equal if their names are equal. Unnamed locales are considered equal if they are copies of each other.

The != operator is synthesized from operator==.

(since C++20)

Contents

[edit] Parameters

other - a std::locale object to compare

[edit] Return value

1) true if other is a copy of *this or has an identical name, false otherwise.
2) false if other is a copy of *this or has an identical name, true otherwise.

[edit] Example

[edit] See also

constructs a new locale
(public member function) [edit]
returns the name of the locale or "*" if unnamed
(public member function) [edit]