[indirect.comp.with.t]

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

## 20.4 Types for composite class design [[mem.composite.types]](mem.composite.types#indirect.comp.with.t)

### 20.4.1 Class template indirect [[indirect]](indirect#comp.with.t)

#### 20.4.1.9 Comparison with T [indirect.comp.with.t]

[ð](#itemdecl:1)

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

[1](#1)

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

*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#L6710)

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

[ð](#itemdecl:2)

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

[3](#3)

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

*Returns*: If lhs is valueless, strong_ordering​::​less;
otherwise *synth-three-way*(*lhs, rhs)[.](#3.sentence-1)
