diff options
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 380 |
1 files changed, 190 insertions, 190 deletions
diff --git a/src/amount.cc b/src/amount.cc index 01caf4ac..9817f464 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -56,8 +56,8 @@ struct amount_t::bigint_t : public supports_flags<> #define BIGINT_BULK_ALLOC 0x01 #define BIGINT_KEEP_PREC 0x02 - mpq_t val; - precision_t prec; + mpq_t val; + precision_t prec; uint_least32_t refc; #define MP(bigint) ((bigint)->val) @@ -68,7 +68,7 @@ struct amount_t::bigint_t : public supports_flags<> } bigint_t(const bigint_t& other) : supports_flags<>(static_cast<uint_least8_t> - (other.flags() & ~BIGINT_BULK_ALLOC)), + (other.flags() & ~BIGINT_BULK_ALLOC)), prec(other.prec), refc(1) { TRACE_CTOR(bigint_t, "copy"); mpq_init(val); @@ -87,7 +87,7 @@ struct amount_t::bigint_t : public supports_flags<> } if (flags() & ~(BIGINT_BULK_ALLOC | BIGINT_KEEP_PREC)) { DEBUG("ledger.validate", - "amount_t::bigint_t: flags() & ~(BULK_ALLOC | KEEP_PREC)"); + "amount_t::bigint_t: flags() & ~(BULK_ALLOC | KEEP_PREC)"); return false; } return true; @@ -111,18 +111,18 @@ private: bool amount_t::is_initialized = false; namespace { - void stream_out_mpq(std::ostream& out, - mpq_t quant, - amount_t::precision_t precision, - int zeros_prec = -1, - const optional<commodity_t&>& comm = none) + void stream_out_mpq(std::ostream& out, + mpq_t quant, + amount_t::precision_t precision, + int zeros_prec = -1, + const optional<commodity_t&>& comm = none) { char * buf = NULL; try { IF_DEBUG("amount.convert") { - char * tbuf = mpq_get_str(NULL, 10, quant); - DEBUG("amount.convert", "Rational to convert = " << tbuf); - std::free(tbuf); + char * tbuf = mpq_get_str(NULL, 10, quant); + DEBUG("amount.convert", "Rational to convert = " << tbuf); + std::free(tbuf); } // Convert the rational number to a floating-point, extending the @@ -131,7 +131,7 @@ namespace { mp_prec_t num_prec = mpz_sizeinbase(mpq_numref(quant), 2); num_prec += amount_t::extend_by_digits*64; if (num_prec < MPFR_PREC_MIN) - num_prec = MPFR_PREC_MIN; + num_prec = MPFR_PREC_MIN; DEBUG("amount.convert", "num prec = " << num_prec); mpfr_set_prec(tempfnum, num_prec); @@ -140,7 +140,7 @@ namespace { mp_prec_t den_prec = mpz_sizeinbase(mpq_denref(quant), 2); den_prec += amount_t::extend_by_digits*64; if (den_prec < MPFR_PREC_MIN) - den_prec = MPFR_PREC_MIN; + den_prec = MPFR_PREC_MIN; DEBUG("amount.convert", "den prec = " << den_prec); mpfr_set_prec(tempfden, den_prec); @@ -150,73 +150,73 @@ namespace { mpfr_div(tempfb, tempfnum, tempfden, GMP_RNDN); if (mpfr_asprintf(&buf, "%.*RNf", precision, tempfb) < 0) - throw_(amount_error, - _("Cannot output amount to a floating-point representation")); - + throw_(amount_error, + _("Cannot output amount to a floating-point representation")); + DEBUG("amount.convert", "mpfr_print = " << buf - << " (precision " << precision - << ", zeros_prec " << zeros_prec << ")"); + << " (precision " << precision + << ", zeros_prec " << zeros_prec << ")"); if (zeros_prec >= 0) { - string::size_type index = std::strlen(buf); - string::size_type point = 0; - for (string::size_type i = 0; i < index; i++) { - if (buf[i] == '.') { - point = i; - break; - } - } - if (point > 0) { - while (--index >= (point + 1 + zeros_prec) && buf[index] == '0') - buf[index] = '\0'; - if (index >= (point + zeros_prec) && buf[index] == '.') - buf[index] = '\0'; - } + string::size_type index = std::strlen(buf); + string::size_type point = 0; + for (string::size_type i = 0; i < index; i++) { + if (buf[i] == '.') { + point = i; + break; + } + } + if (point > 0) { + while (--index >= (point + 1 + zeros_prec) && buf[index] == '0') + buf[index] = '\0'; + if (index >= (point + zeros_prec) && buf[index] == '.') + buf[index] = '\0'; + } } if (comm) { - int integer_digits = 0; - if (comm && comm->has_flags(COMMODITY_STYLE_THOUSANDS)) { - // Count the number of integer digits - for (const char * p = buf; *p; p++) { - if (*p == '.') - break; - else if (*p != '-') - integer_digits++; - } - } - - for (const char * p = buf; *p; p++) { - if (*p == '.') { - if (commodity_t::decimal_comma_by_default || - (comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA))) - out << ','; - else - out << *p; - assert(integer_digits <= 3); - } - else if (*p == '-') { - out << *p; - } - else { - out << *p; - - if (integer_digits > 3 && --integer_digits % 3 == 0) { - if (commodity_t::decimal_comma_by_default || - (comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA))) - out << '.'; - else - out << ','; - } - } - } + int integer_digits = 0; + if (comm && comm->has_flags(COMMODITY_STYLE_THOUSANDS)) { + // Count the number of integer digits + for (const char * p = buf; *p; p++) { + if (*p == '.') + break; + else if (*p != '-') + integer_digits++; + } + } + + for (const char * p = buf; *p; p++) { + if (*p == '.') { + if (commodity_t::decimal_comma_by_default || + (comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA))) + out << ','; + else + out << *p; + assert(integer_digits <= 3); + } + else if (*p == '-') { + out << *p; + } + else { + out << *p; + + if (integer_digits > 3 && --integer_digits % 3 == 0) { + if (commodity_t::decimal_comma_by_default || + (comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA))) + out << '.'; + else + out << ','; + } + } + } } else { - out << buf; + out << buf; } } catch (...) { if (buf != NULL) - mpfr_free_str(buf); + mpfr_free_str(buf); throw; } if (buf != NULL) @@ -288,7 +288,7 @@ void amount_t::_copy(const amount_t& amt) } else { quantity = amt.quantity; DEBUG("amounts.refs", - quantity << " refc++, now " << (quantity->refc + 1)); + quantity << " refc++, now " << (quantity->refc + 1)); quantity->refc++; } } @@ -391,8 +391,8 @@ int amount_t::compare(const amount_t& amt) const if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) throw_(amount_error, - _("Cannot compare amounts with different commodities: %1 and %2") - << commodity().symbol() << amt.commodity().symbol()); + _("Cannot compare amounts with different commodities: %1 and %2") + << commodity().symbol() << amt.commodity().symbol()); return mpq_cmp(MP(quantity), MP(amt.quantity)); } @@ -426,9 +426,9 @@ amount_t& amount_t::operator+=(const amount_t& amt) if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) throw_(amount_error, - _("Adding amounts with different commodities: %1 != %2") - << (has_commodity() ? commodity().symbol() : _("NONE")) - << (amt.has_commodity() ? amt.commodity().symbol() : _("NONE"))); + _("Adding amounts with different commodities: %1 != %2") + << (has_commodity() ? commodity().symbol() : _("NONE")) + << (amt.has_commodity() ? amt.commodity().symbol() : _("NONE"))); _dup(); @@ -457,9 +457,9 @@ amount_t& amount_t::operator-=(const amount_t& amt) if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) throw_(amount_error, - _("Subtracting amounts with different commodities: %1 != %2") - << (has_commodity() ? commodity().symbol() : _("NONE")) - << (amt.has_commodity() ? amt.commodity().symbol() : _("NONE"))); + _("Subtracting amounts with different commodities: %1 != %2") + << (has_commodity() ? commodity().symbol() : _("NONE")) + << (amt.has_commodity() ? amt.commodity().symbol() : _("NONE"))); _dup(); @@ -527,7 +527,7 @@ amount_t& amount_t::operator/=(const amount_t& amt) mpq_div(MP(quantity), MP(quantity), MP(amt.quantity)); quantity->prec = static_cast<precision_t>(quantity->prec + amt.quantity->prec + - extend_by_digits); + extend_by_digits); if (! has_commodity()) commodity_ = amt.commodity_; @@ -550,7 +550,7 @@ amount_t::precision_t amount_t::precision() const { if (! quantity) throw_(amount_error, - _("Cannot determine precision of an uninitialized amount")); + _("Cannot determine precision of an uninitialized amount")); return quantity->prec; } @@ -559,7 +559,7 @@ bool amount_t::keep_precision() const { if (! quantity) throw_(amount_error, - _("Cannot determine if precision of an uninitialized amount is kept")); + _("Cannot determine if precision of an uninitialized amount is kept")); return quantity->has_flags(BIGINT_KEEP_PREC); } @@ -568,7 +568,7 @@ void amount_t::set_keep_precision(const bool keep) const { if (! quantity) throw_(amount_error, - _("Cannot set whether to keep the precision of an uninitialized amount")); + _("Cannot set whether to keep the precision of an uninitialized amount")); if (keep) quantity->add_flags(BIGINT_KEEP_PREC); @@ -580,7 +580,7 @@ amount_t::precision_t amount_t::display_precision() const { if (! quantity) throw_(amount_error, - _("Cannot determine display precision of an uninitialized amount")); + _("Cannot determine display precision of an uninitialized amount")); commodity_t& comm(commodity()); @@ -632,7 +632,7 @@ void amount_t::in_place_truncate() _dup(); DEBUG("amount.truncate", - "Truncating " << *this << " to precision " << display_precision()); + "Truncating " << *this << " to precision " << display_precision()); std::ostringstream out; stream_out_mpq(out, MP(quantity), display_precision()); @@ -704,9 +704,9 @@ void amount_t::in_place_unreduce() if (! quantity) throw_(amount_error, _("Cannot unreduce an uninitialized amount")); - amount_t temp = *this; - commodity_t * comm = commodity_; - bool shifted = false; + amount_t temp = *this; + commodity_t * comm = commodity_; + bool shifted = false; while (comm && comm->larger()) { amount_t next_temp = temp / comm->larger()->number(); @@ -725,57 +725,57 @@ void amount_t::in_place_unreduce() optional<amount_t> amount_t::value(const optional<datetime_t>& moment, - const optional<commodity_t&>& in_terms_of) const + const optional<commodity_t&>& in_terms_of) const { if (quantity) { #if defined(DEBUG_ON) DEBUG("commodity.prices.find", - "amount_t::value of " << commodity().symbol()); + "amount_t::value of " << commodity().symbol()); if (moment) DEBUG("commodity.prices.find", - "amount_t::value: moment = " << *moment); + "amount_t::value: moment = " << *moment); if (in_terms_of) DEBUG("commodity.prices.find", - "amount_t::value: in_terms_of = " << in_terms_of->symbol()); + "amount_t::value: in_terms_of = " << in_terms_of->symbol()); #endif if (has_commodity() && - (in_terms_of || ! commodity().has_flags(COMMODITY_PRIMARY))) { + (in_terms_of || ! commodity().has_flags(COMMODITY_PRIMARY))) { optional<price_point_t> point; optional<commodity_t&> comm(in_terms_of); if (comm && commodity().referent() == comm->referent()) { - return *this; + return *this; } else if (has_annotation() && annotation().price) { - if (annotation().has_flags(ANNOTATION_PRICE_FIXATED)) { - point = price_point_t(); - point->price = *annotation().price; - } - else if (! in_terms_of) { - comm = annotation().price->commodity(); - } + if (annotation().has_flags(ANNOTATION_PRICE_FIXATED)) { + point = price_point_t(); + point->price = *annotation().price; + } + else if (! in_terms_of) { + comm = annotation().price->commodity(); + } } if (! point) { - point = commodity().find_price(comm, moment); - // Whether a price was found or not, check whether we should attempt - // to download a price from the Internet. This is done if (a) no - // price was found, or (b) the price is "stale" according to the - // setting of --price-exp. - if (point) - point = commodity().check_for_updated_price(point, moment, comm); + point = commodity().find_price(comm, moment); + // Whether a price was found or not, check whether we should attempt + // to download a price from the Internet. This is done if (a) no + // price was found, or (b) the price is "stale" according to the + // setting of --price-exp. + if (point) + point = commodity().check_for_updated_price(point, moment, comm); } if (point) { - amount_t price(point->price); - price.multiply(*this, true); - price.in_place_round(); - return price; + amount_t price(point->price); + price.multiply(*this, true); + price.in_place_round(); + return price; } } } else { throw_(amount_error, - _("Cannot determine value of an uninitialized amount")); + _("Cannot determine value of an uninitialized amount")); } return none; } @@ -813,7 +813,7 @@ bool amount_t::is_zero() const return true; } else if (mpz_cmp(mpq_numref(MP(quantity)), - mpq_denref(MP(quantity))) > 0) { + mpq_denref(MP(quantity))) > 0) { DEBUG("amount.is_zero", "Numerator is larger than the denominator"); return false; } @@ -825,9 +825,9 @@ bool amount_t::is_zero() const string output = out.str(); if (! output.empty()) { - for (const char * p = output.c_str(); *p; p++) - if (*p != '0' && *p != '.' && *p != '-') - return false; + for (const char * p = output.c_str(); *p; p++) + if (*p != '0' && *p != '.' && *p != '-') + return false; } return true; } @@ -863,7 +863,7 @@ bool amount_t::fits_in_long() const commodity_t& amount_t::commodity() const { return (has_commodity() ? - *commodity_ : *commodity_pool_t::current_pool->null_commodity); + *commodity_ : *commodity_pool_t::current_pool->null_commodity); } bool amount_t::has_commodity() const @@ -873,13 +873,13 @@ bool amount_t::has_commodity() const void amount_t::annotate(const annotation_t& details) { - commodity_t * this_base; + commodity_t * this_base; annotated_commodity_t * this_ann = NULL; if (! quantity) throw_(amount_error, _("Cannot annotate the commodity of an uninitialized amount")); else if (! has_commodity()) - return; // ignore attempt to annotate a "bare commodity + return; // ignore attempt to annotate a "bare commodity if (commodity().has_annotation()) { this_ann = &as_annotated_commodity(commodity()); @@ -890,7 +890,7 @@ void amount_t::annotate(const annotation_t& details) assert(this_base); DEBUG("amounts.commodities", "Annotating commodity for amount " - << *this << std::endl << details); + << *this << std::endl << details); if (commodity_t * ann_comm = this_base->pool().find_or_create(*this_base, details)) @@ -907,10 +907,10 @@ bool amount_t::has_annotation() const { if (! quantity) throw_(amount_error, - _("Cannot determine if an uninitialized amount's commodity is annotated")); + _("Cannot determine if an uninitialized amount's commodity is annotated")); assert(! has_commodity() || ! commodity().has_annotation() || - as_annotated_commodity(commodity()).details); + as_annotated_commodity(commodity()).details); return has_commodity() && commodity().has_annotation(); } @@ -918,11 +918,11 @@ annotation_t& amount_t::annotation() { if (! quantity) throw_(amount_error, - _("Cannot return commodity annotation details of an uninitialized amount")); + _("Cannot return commodity annotation details of an uninitialized amount")); if (! commodity().has_annotation()) throw_(amount_error, - _("Request for annotation details from an unannotated amount")); + _("Request for annotation details from an unannotated amount")); annotated_commodity_t& ann_comm(as_annotated_commodity(commodity())); return ann_comm.details; @@ -932,7 +932,7 @@ amount_t amount_t::strip_annotations(const keep_details_t& what_to_keep) const { if (! quantity) throw_(amount_error, - _("Cannot strip commodity annotations from an uninitialized amount")); + _("Cannot strip commodity annotations from an uninitialized amount")); if (! what_to_keep.keep_all(commodity())) { amount_t t(*this); @@ -949,7 +949,7 @@ namespace { char buf[256]; char c = peek_next_nonws(in); READ_INTO(in, buf, 255, c, - std::isdigit(c) || c == '-' || c == '.' || c == ','); + std::isdigit(c) || c == '-' || c == '.' || c == ','); string::size_type len = std::strlen(buf); while (len > 0 && ! std::isdigit(buf[len - 1])) { @@ -971,7 +971,7 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) string symbol; string quant; annotation_t details; - bool negative = false; + bool negative = false; commodity_t::flags_t comm_flags = COMMODITY_STYLE_DEFAULTS; @@ -988,28 +988,28 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) if (! in.eof() && ((n = static_cast<char>(in.peek())) != '\n')) { if (std::isspace(n)) - comm_flags |= COMMODITY_STYLE_SEPARATED; + comm_flags |= COMMODITY_STYLE_SEPARATED; commodity_t::parse_symbol(in, symbol); if (! symbol.empty()) - comm_flags |= COMMODITY_STYLE_SUFFIXED; + comm_flags |= COMMODITY_STYLE_SUFFIXED; if (! in.eof() && ((n = static_cast<char>(in.peek())) != '\n')) - details.parse(in); + details.parse(in); } } else { commodity_t::parse_symbol(in, symbol); if (! in.eof() && ((n = static_cast<char>(in.peek())) != '\n')) { if (std::isspace(static_cast<char>(in.peek()))) - comm_flags |= COMMODITY_STYLE_SEPARATED; + comm_flags |= COMMODITY_STYLE_SEPARATED; parse_quantity(in, quant); if (! quant.empty() && ! in.eof() && - ((n = static_cast<char>(in.peek())) != '\n')) - details.parse(in); + ((n = static_cast<char>(in.peek())) != '\n')) + details.parse(in); } } @@ -1059,7 +1059,7 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) if (details) commodity_ = - commodity_pool_t::current_pool->find_or_create(*commodity_, details); + commodity_pool_t::current_pool->find_or_create(*commodity_, details); } // Quickly scan through and verify the correctness of the amount's use of @@ -1083,59 +1083,59 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) if (ch == '.') { if (no_more_periods) - throw_(amount_error, _("Too many periods in amount")); + throw_(amount_error, _("Too many periods in amount")); if (decimal_comma_style) { - if (decimal_offset % 3 != 0) - throw_(amount_error, _("Incorrect use of thousand-mark period")); - comm_flags |= COMMODITY_STYLE_THOUSANDS; - no_more_commas = true; + if (decimal_offset % 3 != 0) + throw_(amount_error, _("Incorrect use of thousand-mark period")); + comm_flags |= COMMODITY_STYLE_THOUSANDS; + no_more_commas = true; } else { - if (last_comma != string::npos) { - decimal_comma_style = true; - if (decimal_offset % 3 != 0) - throw_(amount_error, _("Incorrect use of thousand-mark period")); - } else { - no_more_periods = true; - new_quantity->prec = decimal_offset; - decimal_offset = 0; - } + if (last_comma != string::npos) { + decimal_comma_style = true; + if (decimal_offset % 3 != 0) + throw_(amount_error, _("Incorrect use of thousand-mark period")); + } else { + no_more_periods = true; + new_quantity->prec = decimal_offset; + decimal_offset = 0; + } } if (last_period == string::npos) - last_period = string_index; + last_period = string_index; } else if (ch == ',') { if (no_more_commas) - throw_(amount_error, _("Too many commas in amount")); + throw_(amount_error, _("Too many commas in amount")); if (decimal_comma_style) { - if (last_period != string::npos) { - throw_(amount_error, _("Incorrect use of decimal comma")); - } else { - no_more_commas = true; - new_quantity->prec = decimal_offset; - decimal_offset = 0; - } + if (last_period != string::npos) { + throw_(amount_error, _("Incorrect use of decimal comma")); + } else { + no_more_commas = true; + new_quantity->prec = decimal_offset; + decimal_offset = 0; + } } else { - if (decimal_offset % 3 != 0) { - if (last_comma != string::npos || - last_period != string::npos) { - throw_(amount_error, _("Incorrect use of thousand-mark comma")); - } else { - decimal_comma_style = true; - no_more_commas = true; - new_quantity->prec = decimal_offset; - decimal_offset = 0; - } - } else { - comm_flags |= COMMODITY_STYLE_THOUSANDS; - no_more_periods = true; - } + if (decimal_offset % 3 != 0) { + if (last_comma != string::npos || + last_period != string::npos) { + throw_(amount_error, _("Incorrect use of thousand-mark comma")); + } else { + decimal_comma_style = true; + no_more_commas = true; + new_quantity->prec = decimal_offset; + decimal_offset = 0; + } + } else { + comm_flags |= COMMODITY_STYLE_THOUSANDS; + no_more_periods = true; + } } if (last_comma == string::npos) - last_comma = string_index; + last_comma = string_index; } else { decimal_offset++; @@ -1163,11 +1163,11 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) string::size_type len = quant.length(); scoped_array<char> buf(new char[len + 1]); const char * p = quant.c_str(); - char * t = buf.get(); + char * t = buf.get(); while (*p) { if (*p == ',' || *p == '.') - p++; + p++; *t++ = *p++; } *t = '\0'; @@ -1193,7 +1193,7 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) quantity = new_quantity.release(); if (! flags.has_flags(PARSE_NO_REDUCE)) - in_place_reduce(); // will not throw an exception + in_place_reduce(); // will not throw an exception VERIFY(valid()); @@ -1201,7 +1201,7 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) } void amount_t::parse_conversion(const string& larger_str, - const string& smaller_str) + const string& smaller_str) { amount_t larger, smaller; @@ -1213,7 +1213,7 @@ void amount_t::parse_conversion(const string& larger_str, if (larger.commodity()) { larger.commodity().set_smaller(smaller); larger.commodity().add_flags(smaller.commodity().flags() | - COMMODITY_NOMARKET); + COMMODITY_NOMARKET); } if (smaller.commodity()) smaller.commodity().set_larger(larger); @@ -1239,7 +1239,7 @@ void amount_t::print(std::ostream& _out, const uint_least8_t flags) const } stream_out_mpq(out, MP(quantity), display_precision(), - comm ? commodity().precision() : 0, comm); + comm ? commodity().precision() : 0, comm); if (comm.has_flags(COMMODITY_STYLE_SUFFIXED)) { if (comm.has_flags(COMMODITY_STYLE_SEPARATED)) @@ -1325,7 +1325,7 @@ void serialize(Archive& ar, MP_RAT& mpq, const unsigned int /* version */) template <class Archive> void serialize(Archive& ar, long unsigned int& integer, - const unsigned int /* version */) + const unsigned int /* version */) { ar & make_binary_object(&integer, sizeof(long unsigned int)); } @@ -1336,23 +1336,23 @@ void serialize(Archive& ar, long unsigned int& integer, BOOST_CLASS_EXPORT(ledger::annotated_commodity_t) template void boost::serialization::serialize(boost::archive::binary_iarchive&, - MP_INT&, const unsigned int); + MP_INT&, const unsigned int); template void boost::serialization::serialize(boost::archive::binary_oarchive&, - MP_INT&, const unsigned int); + MP_INT&, const unsigned int); template void boost::serialization::serialize(boost::archive::binary_iarchive&, - MP_RAT&, const unsigned int); + MP_RAT&, const unsigned int); template void boost::serialization::serialize(boost::archive::binary_oarchive&, - MP_RAT&, const unsigned int); + MP_RAT&, const unsigned int); template void boost::serialization::serialize(boost::archive::binary_iarchive&, - long unsigned int&, - const unsigned int); + long unsigned int&, + const unsigned int); template void boost::serialization::serialize(boost::archive::binary_oarchive&, - long unsigned int&, - const unsigned int); + long unsigned int&, + const unsigned int); template void ledger::amount_t::serialize(boost::archive::binary_iarchive&, - const unsigned int); + const unsigned int); template void ledger::amount_t::serialize(boost::archive::binary_oarchive&, - const unsigned int); + const unsigned int); #endif // HAVE_BOOST_SERIALIZATION |