20 Memory management library [mem]

20.3 Pointer tagging [ptrtag]

20.3.2 Class template pointer_tag_pair [ptrtag.pair]

20.3.2.7 Comparisons [ptrtag.pair.comp]

friend constexpr auto operator<=>(pointer_tag_pair lhs, pointer_tag_pair rhs) noexcept requires three_way_comparable<tag_type>;
Effects: Equivalent to: return pair(lhs.pointer(), lhs.tag()) <=> pair(rhs.pointer(), rhs.tag());
Recommended practice: Directly compare the internal bit representations if the expression lhs.tag() <=> rhs.tag() results in a call to a built-in operator <=> comparing values of type tag_type.
[Note 1: 
The result of comparing unrelated pointers is unspecified.
— end note]
friend constexpr bool operator==(pointer_tag_pair lhs, pointer_tag_pair rhs) noexcept requires equality_comparable<tag_type>;
Effects: Equivalent to: return pair(lhs.pointer(), lhs.tag()) == pair(rhs.pointer(), rhs.tag());
Recommended practice: Directly compare the internal bit representations if the expression lhs.tag() == rhs.tag() results in a call to a built-in operator == comparing values of type tag_type.