Remove FMT_STATIC_THOUSANDS_SEPARATOR in favor of FMT_USE_LOCALE

This commit is contained in:
Victor Zverovich 2024-09-11 18:30:05 -07:00
parent a1d6f9a973
commit b90b4bc981
2 changed files with 3 additions and 9 deletions

View File

@ -2286,12 +2286,8 @@ struct is_output_iterator<
void_t<decltype(*std::declval<decay_t<It>&>()++ = std::declval<T>())>>
: std::true_type {};
#ifdef FMT_USE_LOCALE
// Use the provided definition.
#elif defined(FMT_STATIC_THOUSANDS_SEPARATOR) || FMT_OPTIMIZE_SIZE > 1
# define FMT_USE_LOCALE 0
#else
# define FMT_USE_LOCALE 1
#ifndef FMT_USE_LOCALE
# define FMT_USE_LOCALE (FMT_OPTIMIZE_SIZE <= 1)
#endif
// A type-erased reference to an std::locale to avoid a heavy <locale> include.

View File

@ -24,8 +24,6 @@
#if FMT_USE_LOCALE
# include <locale>
#elif !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
# define FMT_STATIC_THOUSANDS_SEPARATOR ','
#endif
FMT_BEGIN_NAMESPACE
@ -90,7 +88,7 @@ locale_ref::locale_ref(const Locale& loc) : locale_(&loc) {
struct locale {};
template <typename Char> struct numpunct {
auto grouping() const -> std::string { return "\03"; }
auto thousands_sep() const -> Char { return FMT_STATIC_THOUSANDS_SEPARATOR; }
auto thousands_sep() const -> Char { return ','; }
auto decimal_point() const -> Char { return '.'; }
};
template <typename Facet> Facet use_facet(locale) { return {}; }