Decimal data type for fixed-point arithmetic.
Definition in file decimal64.hpp.
|
constexpr int64_t | decimal64::Pow10 (int exp) |
| A fast, constexpr-friendly power of 10.
|
|
template<typename T , int OldPrec, typename OldRound > |
constexpr T | decimal64::decimal_cast (Decimal< OldPrec, OldRound > arg) |
| Cast one Decimal to another Decimal type.
|
|
template<int Prec, typename RoundPolicy > |
std::string | decimal64::ToString (Decimal< Prec, RoundPolicy > dec) |
| Converts Decimal to a string.
|
|
template<int Prec, typename RoundPolicy > |
std::string | decimal64::ToString (const Decimal< Prec, RoundPolicy > &dec, const FormatOptions &format_options) |
| Converts Decimal to a string.
|
|
template<int Prec, typename RoundPolicy > |
std::string | decimal64::ToStringTrailingZeros (Decimal< Prec, RoundPolicy > dec) |
| Converts Decimal to a string, writing exactly Prec decimal digits.
|
|
template<int NewPrec, int Prec, typename RoundPolicy > |
std::string | decimal64::ToStringFixed (Decimal< Prec, RoundPolicy > dec) |
| Converts Decimal to a string with exactly NewPrec decimal digits.
|
|
template<typename CharT , typename Traits , int Prec, typename RoundPolicy > |
std::basic_istream< CharT, Traits > & | decimal64::operator>> (std::basic_istream< CharT, Traits > &is, Decimal< Prec, RoundPolicy > &d) |
| Parses a Decimal from the istream
|
|
template<typename CharT , typename Traits , int Prec, typename RoundPolicy > |
std::basic_ostream< CharT, Traits > & | decimal64::operator<< (std::basic_ostream< CharT, Traits > &os, const Decimal< Prec, RoundPolicy > &d) |
| Writes the Decimal to the ostream
|
|
template<int Prec, typename RoundPolicy > |
logging::LogHelper & | decimal64::operator<< (logging::LogHelper &lh, const Decimal< Prec, RoundPolicy > &d) |
| Writes the Decimal to the logger.
|
|
template<int Prec, typename RoundPolicy , typename Value > |
std::enable_if_t< formats::common::kIsFormatValue< Value >, Decimal< Prec, RoundPolicy > > | decimal64::Parse (const Value &value, formats::parse::To< Decimal< Prec, RoundPolicy > >) |
| Parses the Decimal from the string.
|
|
template<int Prec, typename RoundPolicy , typename TargetType > |
TargetType | decimal64::Serialize (const Decimal< Prec, RoundPolicy > &object, formats::serialize::To< TargetType >) |
| Serializes the Decimal to string.
|
|
template<int Prec, typename RoundPolicy , typename StringBuilder > |
void | decimal64::WriteToStream (const Decimal< Prec, RoundPolicy > &object, StringBuilder &sw) |
| Writes the Decimal to stream.
|
|