summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--balance.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/balance.h b/balance.h
index ba76d459..24b1f2dc 100644
--- a/balance.h
+++ b/balance.h
@@ -926,6 +926,22 @@ class balance_pair_t
temp.cost = new balance_t(cost->unround());
return temp;
}
+
+ friend inline bool operator<(const balance_t& bal, const balance_pair_t& bal_pair) {
+ return bal_pair >= bal;
+ }
+ friend inline bool operator<=(const balance_t& bal, const balance_pair_t& bal_pair) {
+ return bal_pair > bal;
+ }
+ friend inline bool operator>(const balance_t& bal, const balance_pair_t& bal_pair) {
+ return bal_pair <= bal;
+ }
+ friend inline bool operator>=(const balance_t& bal, const balance_pair_t& bal_pair) {
+ return bal_pair < bal;
+ }
+ friend inline bool operator==(const balance_t& bal, const balance_pair_t& bal_pair) {
+ return bal_pair == bal;
+ }
};
inline balance_pair_t abs(const balance_pair_t& bal_pair) {