From 6ec2f6b59be2fe8e621e97a39836e7033fd0f240 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 7 May 2007 10:27:29 +0000 Subject: Reconfigure some of the operators. --- src/balance.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/balance.h') 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 > > > > + multiplicative > > > > > > { public: typedef std::map amounts_map; @@ -235,7 +237,9 @@ class balance_pair_t additive > > > > > > + multiplicative > > > > > > > > { balance_t quantity; optional 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; -- cgit v1.2.3