3#include <userver/chaotic/convert.hpp>
4#include <userver/decimal64/decimal64.hpp>
8namespace chaotic::convert {
10template <
int Prec,
typename RoundPolicy>
11std::string Convert(
const decimal64::
Decimal<Prec, RoundPolicy>& value, chaotic::convert::
To<std::string>) {
12 return ToString(value);
15template <
int Prec,
typename RoundPolicy>
17Convert(
const std::string& str, chaotic::convert::
To<
decimal64::
Decimal<Prec, RoundPolicy>>) {
21template <
int Prec,
typename RoundPolicy>
27template <
int Prec,
typename RoundPolicy>
28int Convert(
const decimal64::
Decimal<Prec, RoundPolicy>& value, chaotic::convert::
To<
int>) {
29 return value.ToInteger();