[text.encoding.cmp]

# 28 Text processing library [[text]](./#text)

## 28.4 Text encodings identification [[text.encoding]](text.encoding#cmp)

### 28.4.2 Class text_encoding [[text.encoding.class]](text.encoding.class#text.encoding.cmp)

#### 28.4.2.4 Comparison functions [text.encoding.cmp]

[ð](#lib:operator==,text_encoding)

`friend constexpr bool operator==(const text_encoding& a, const text_encoding& b) noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L5362)

*Returns*: If a.*mib_* == id​::​other && b.*mib_* == id​::​other is true,
then *comp-name*(a.*name_*,  
b.*name_*)[.](#1.sentence-1)

Otherwise, a.*mib_* == b.*mib_*[.](#1.sentence-2)

[ð](#lib:operator==,text_encoding_)

`friend constexpr bool operator==(const text_encoding& encoding, id i) noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L5376)

*Returns*: encoding.*mib_* == i[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L5380)

*Remarks*: This operator induces an equivalence relation on its arguments
if and only if i != id​::​other is true[.](#3.sentence-1)
