diff options
Diffstat (limited to 'src/balance.h')
-rw-r--r-- | src/balance.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/balance.h b/src/balance.h index a7c95870..40f1eec0 100644 --- a/src/balance.h +++ b/src/balance.h @@ -41,7 +41,9 @@ class balance_t equality_comparable<balance_t, amount_t, additive<balance_t, additive<balance_t, amount_t, - multiplicative<balance_t, amount_t> > > > > + multiplicative<balance_t, amount_t, + multiplicative<balance_t, unsigned long, + multiplicative<balance_t, long> > > > > > > { public: typedef std::map<const commodity_t *, amount_t> amounts_map; @@ -235,7 +237,9 @@ class balance_pair_t additive<balance_pair_t, additive<balance_pair_t, balance_t, additive<balance_pair_t, amount_t, - multiplicative<balance_pair_t, amount_t> > > > > > > + multiplicative<balance_pair_t, unsigned long, + multiplicative<balance_pair_t, long, + multiplicative<balance_pair_t, amount_t> > > > > > > > > { balance_t quantity; optional<balance_t> cost; @@ -298,6 +302,9 @@ public: bool operator==(const balance_t& bal) const { return quantity == bal; } + bool operator==(const amount_t& amt) const { + return quantity == amt; + } balance_pair_t& operator*=(const amount_t& amt) { quantity *= amt; |