Use the decimal point from locale

This commit is contained in:
Victor Zverovich
2019-07-03 17:25:57 -07:00
parent 476f25cd81
commit bc14c6ee20
5 changed files with 45 additions and 18 deletions

View File

@@ -210,12 +210,20 @@ template <typename Char> FMT_FUNC Char thousands_sep_impl(locale_ref loc) {
return std::use_facet<std::numpunct<Char>>(loc.get<std::locale>())
.thousands_sep();
}
template <typename Char> FMT_FUNC Char decimal_point_impl(locale_ref loc) {
return std::use_facet<std::numpunct<Char>>(loc.get<std::locale>())
.decimal_point();
}
} // namespace internal
#else
template <typename Char>
FMT_FUNC Char internal::thousands_sep_impl(locale_ref) {
return FMT_STATIC_THOUSANDS_SEPARATOR;
}
template <typename Char>
FMT_FUNC Char internal::decimal_point_impl(locale_ref) {
return '.';
}
#endif
FMT_API FMT_FUNC format_error::~format_error() FMT_NOEXCEPT {}