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

来自cppreference.com
< cpp‎ | locale‎ | locale
定义于头文件 <locale>
bool operator==( const locale& other ) const;
(1)
bool operator!=( const locale& other ) const;
(2) (C++20 前)

测试二个本地环境的相等性。若具名 locale 的名称相等则认为它们相等。若无名 locale 互为彼此的副本则认为它们相等。

!= 运算符从 operator== 合成

(C++20 起)

参数

other - 要比较的 std::locale 对象

返回值

1)other*this 的副本或拥有等同名称则为 true ,否则为 false
2)other*this 的副本或拥有等同名称则为 false ,否则为 true

示例

参阅

构造新的 locale
(公开成员函数)
返回 locale 的名称,或若它无名则为 "*"
(公开成员函数)