summaryrefslogtreecommitdiff
path: root/balance.h
diff options
context:
space:
mode:
Diffstat (limited to 'balance.h')
-rw-r--r--balance.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/balance.h b/balance.h
index 0740ea59..e671192f 100644
--- a/balance.h
+++ b/balance.h
@@ -389,6 +389,11 @@ inline balance_t abs(const balance_t& bal) {
return temp;
}
+inline std::ostream& operator<<(std::ostream& out, const balance_t& bal) {
+ bal.write(out, 12);
+}
+
+
class balance_pair_t
{
public:
@@ -754,6 +759,11 @@ inline balance_pair_t abs(const balance_pair_t& bal_pair) {
return temp;
}
+inline std::ostream& operator<<(std::ostream& out,
+ const balance_pair_t& bal_pair) {
+ bal_pair.quantity.write(out, 12);
+}
+
} // namespace ledger
#endif // _BALANCE_H