diff options
Diffstat (limited to 'value.h')
-rw-r--r-- | value.h | 47 |
1 files changed, 43 insertions, 4 deletions
@@ -249,20 +249,59 @@ class value_t value_t cost() const; }; +inline value_t operator+(const balance_pair_t& value, const value_t& obj) { + return value_t(value) + obj; +} +inline value_t operator+(const balance_t& value, const value_t& obj) { + return value_t(value) + obj; +} +inline value_t operator+(const amount_t& value, const value_t& obj) { + return value_t(value) + obj; +} template <typename T> -value_t operator+(const T& value, const value_t& obj) { +inline value_t operator+(T value, const value_t& obj) { return value_t(value) + obj; } + +inline value_t operator-(const balance_pair_t& value, const value_t& obj) { + return value_t(value) - obj; +} +inline value_t operator-(const balance_t& value, const value_t& obj) { + return value_t(value) - obj; +} +inline value_t operator-(const amount_t& value, const value_t& obj) { + return value_t(value) - obj; +} template <typename T> -value_t operator-(const T& value, const value_t& obj) { +inline value_t operator-(T value, const value_t& obj) { return value_t(value) - obj; } + +inline value_t operator*(const balance_pair_t& value, const value_t& obj) { + return value_t(value) * obj; +} +inline value_t operator*(const balance_t& value, const value_t& obj) { + return value_t(value) * obj; +} +inline value_t operator*(const amount_t& value, const value_t& obj) { + return value_t(value) * obj; +} template <typename T> -value_t operator*(const T& value, const value_t& obj) { +inline value_t operator*(T value, const value_t& obj) { return value_t(value) * obj; } + +inline value_t operator/(const balance_pair_t& value, const value_t& obj) { + return value_t(value) / obj; +} +inline value_t operator/(const balance_t& value, const value_t& obj) { + return value_t(value) / obj; +} +inline value_t operator/(const amount_t& value, const value_t& obj) { + return value_t(value) / obj; +} template <typename T> -value_t operator/(const T& value, const value_t& obj) { +inline value_t operator/(T value, const value_t& obj) { return value_t(value) / obj; } |