@@ -79,6 +79,8 @@ struct boxed
7979 else
8080 return boxed<T, Tag>(static_cast <T>(value));
8181 }
82+
83+ [[nodiscard]] constexpr auto operator <=>(boxed const & other) const noexcept = default ;
8284};
8385
8486template <typename T, typename U>
@@ -94,12 +96,6 @@ template <typename T, typename U> constexpr boxed<T, U>& operator--(boxed<T, U>&
9496template <typename T, typename U> constexpr boxed<T, U> operator ++(boxed<T, U>& a, int ) noexcept { auto old = a; a.value ++; return old; }
9597template <typename T, typename U> constexpr boxed<T, U> operator --(boxed<T, U>& a, int ) noexcept { auto old = a; a.value --; return old; }
9698template <typename T, typename U> constexpr T const & operator *(boxed<T, U> const & a) noexcept { return a.value ; }
97- template <typename T, typename U> constexpr bool operator <(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return a.value < b.value ; }
98- template <typename T, typename U> constexpr bool operator >(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return a.value > b.value ; }
99- template <typename T, typename U> constexpr bool operator <=(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return a.value <= b.value ; }
100- template <typename T, typename U> constexpr bool operator >=(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return a.value >= b.value ; }
101- template <typename T, typename U> constexpr bool operator ==(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return a.value == b.value ; }
102- template <typename T, typename U> constexpr bool operator !=(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return a.value != b.value ; }
10399template <typename T, typename U> constexpr bool operator !(boxed<T, U> const & a) noexcept { return !a.value ; }
104100template <typename T, typename U> constexpr boxed<T, U> operator +(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return boxed<T, U>{a.value + b.value }; }
105101template <typename T, typename U> constexpr boxed<T, U> operator -(boxed<T, U> const & a, boxed<T, U> const & b) noexcept { return boxed<T, U>{a.value - b.value }; }
0 commit comments