[expected.un.eq]

# 22 General utilities library [[utilities]](./#utilities)

## 22.8 Expected objects [[expected]](expected#un.eq)

### 22.8.3 Class template unexpected [[expected.unexpected]](expected.unexpected#expected.un.eq)

#### 22.8.3.5 Equality operator [expected.un.eq]

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

`template<class E2>
  friend constexpr bool operator==(const unexpected& x, const unexpected<E2>& y);
`

[1](#1)

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

*Mandates*: The expression x.error() == y.error() is well-formed and
its result is convertible to bool[.](#1.sentence-1)

[2](#2)

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

*Returns*: x.error() == y.error()[.](#2.sentence-1)
