命名空间
变体
操作

operator==(std::text_encoding)

来自 cppreference.cn
< cpp‎ | text‎ | text_encoding
friend constexpr bool operator==( const text_encoding& a,
                                  const text_encoding& b ) noexcept;
(1) (C++26 起)
friend constexpr bool operator==( const text_encoding& a, id i ) noexcept;
(2) (C++26 起)

text_encoding 对象执行比较操作。

1) 比较两个 text_encoding 对象。当 a.mib()b.mib() 都等于 id::other 时,当且仅当 comp-name (a.name(), b.name())true,则对象比较相等;否则当且仅当 a.mib() 等于 b.mib(),则对象比较相等。
2) 比较 text_encoding 对象与 MIBenum 值。当且仅当 a.mib() 等于 i 时,则对象比较相等。

这些函数对于普通的非限定查找限定查找不可见,只能在 std::text_encoding 是参数的关联类时通过依赖于参数的查找找到。

!= 运算符由 operator== 合成

目录

[编辑] 参数

a, b - 要比较的 text_encoding 对象
i - a 中包含的 MIBenum 值进行比较的 id

[编辑] 返回值

1) a.mib() == id::other && b.mib() == id::other
    ? comp-name (a.name(), b.name())
    : a.mib() == b.mib()
2) a.mib() == i

[编辑] 示例

[编辑] 参阅

(在 C++20 中移除)
locale 对象之间的相等性比较
(std::locale 的公共成员函数) [编辑]