summaryrefslogtreecommitdiff
path: root/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'value.h')
-rw-r--r--value.h47
1 files changed, 43 insertions, 4 deletions
diff --git a/value.h b/value.h
index 819f985f..48b45248 100644
--- a/value.h
+++ b/value.h
@@ -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;
}