Attaching a Currency to a Value
Class
RWMoney<T> provides a mapping between an amount and a currency, by encapsulating a decimal value and referencing a currency; the value is an arbitrary decimal type specified as a template parameter.
The following example creates some
RWMoney objects:
.
.
.
RWMoney<RWDecimal64> x("1.23","USD"), y("9.87","USD"),
z("7.99","CAD");
RWMoney<RWDecimal64> s("0","USD");
.
.
.