operator + method

Money operator +(
  1. Money other
)

Implementation

Money operator +(Money other) {
  if (currency != other.currency) throw 'currencies-do-not-match';
  if (precision != other.precision) throw 'precisions-do-not-match';
  return Money.fromFMU(fmu + other.fmu, currency, precision);
}