@@ -124,6 +124,11 @@ template <typename T, typename U> constexpr boxed<T, U> operator-(boxed<T, U> co
124124template <typename T, typename U> constexpr boxed<T, U> operator *(boxed<T, U> const & a, T b) noexcept { return boxed<T, U>{a.value * b}; }
125125template <typename T, typename U> constexpr boxed<T, U> operator /(boxed<T, U> const & a, T b) noexcept { return boxed<T, U>{a.value / b}; }
126126
127+ template <typename T, typename U> constexpr boxed<T, U> operator +(T b, boxed<T, U> const & a) noexcept { return boxed<T, U>{b - a.value }; }
128+ template <typename T, typename U> constexpr boxed<T, U> operator -(T b, boxed<T, U> const & a) noexcept { return boxed<T, U>{b - a.value }; }
129+ template <typename T, typename U> constexpr boxed<T, U> operator *(T b, boxed<T, U> const & a) noexcept { return boxed<T, U>{b * a.value }; }
130+ template <typename T, typename U> constexpr boxed<T, U> operator /(T b, boxed<T, U> const & a) noexcept { return boxed<T, U>{b / a.value }; }
131+
127132template <typename T, typename U> constexpr boxed<T, U>& operator +=(boxed<T, U>& a, boxed<T, U> const & b) noexcept { a.value += b.value ; return a; }
128133template <typename T, typename U> constexpr boxed<T, U>& operator -=(boxed<T, U>& a, boxed<T, U> const & b) noexcept { a.value -= b.value ; return a; }
129134template <typename T, typename U> constexpr boxed<T, U>& operator *=(boxed<T, U>& a, boxed<T, U> const & b) noexcept { a.value *= b.value ; return a; }
0 commit comments