@@ -112,6 +112,11 @@ template <typename T, typename U> constexpr boxed<T, U> operator-(boxed<T, U> co
112112template <typename T, typename U> constexpr boxed<T, U> operator *(boxed<T, U> const & a, T b) noexcept { return boxed<T, U>{a.value * b}; }
113113template <typename T, typename U> constexpr boxed<T, U> operator /(boxed<T, U> const & a, T b) noexcept { return boxed<T, U>{a.value / b}; }
114114
115+ 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 }; }
116+ 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 }; }
117+ 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 }; }
118+ 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 }; }
119+
115120template <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; }
116121template <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; }
117122template <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