The weak_equality type is typically used
as the result type of a three-way comparison operator
that (a) admits only equality and inequality comparisons,
and (b) does not imply substitutability.

namespace std { class weak_equality { int value; // exposition only // exposition-only constructor explicit constexpr weak_equality(eq v) noexcept : value(int(v)) {} // exposition only public: // valid values static const weak_equality equivalent; static const weak_equality nonequivalent; // comparisons friend constexpr bool operator==(weak_equality v, unspecified) noexcept; friend constexpr bool operator!=(weak_equality v, unspecified) noexcept; friend constexpr bool operator==(unspecified, weak_equality v) noexcept; friend constexpr bool operator!=(unspecified, weak_equality v) noexcept; friend constexpr weak_equality operator<=>(weak_equality v, unspecified) noexcept; friend constexpr weak_equality operator<=>(unspecified, weak_equality v) noexcept; }; // valid values' definitions inline constexpr weak_equality weak_equality::equivalent(eq::equivalent); inline constexpr weak_equality weak_equality::nonequivalent(eq::nonequivalent); }

```
constexpr bool operator==(weak_equality v, unspecified) noexcept;
constexpr bool operator==(unspecified, weak_equality v) noexcept;
```

```
constexpr bool operator!=(weak_equality v, unspecified) noexcept;
constexpr bool operator!=(unspecified, weak_equality v) noexcept;
```

```
constexpr weak_equality operator<=>(weak_equality v, unspecified) noexcept;
constexpr weak_equality operator<=>(unspecified, weak_equality v) noexcept;
```