[indirect.relops]

# 20 Memory management library [[mem]](./#mem)

## 20.4 Types for composite class design [[mem.composite.types]](mem.composite.types#indirect.relops)

### 20.4.1 Class template indirect [[indirect]](indirect#relops)

#### 20.4.1.8 Relational operators [indirect.relops]

[ð](#itemdecl:1)

`template<class U, class AA>
  constexpr bool operator==(const indirect& lhs, const indirect<U, AA>& rhs)
    noexcept(noexcept(*lhs == *rhs));
`

[1](#1)

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

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

[2](#2)

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

*Returns*: If lhs is valueless or rhs is valueless,lhs.valueless_after_move() == rhs.valueless_after_move();
otherwise *lhs == *rhs[.](#2.sentence-1)

[ð](#itemdecl:2)

`template<class U, class AA>
  constexpr synth-three-way-result<T, U>
    operator<=>(const indirect& lhs, const indirect<U, AA>& rhs);
`

[3](#3)

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

*Returns*: If lhs is valueless or rhs is valueless,!lhs.valueless_after_move() <=> !rhs.valueless_after_move();
otherwise*synth-three-way*(*lhs, *rhs)[.](#3.sentence-1)
