diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 76e65cc1..be1ddf40 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -166,11 +166,8 @@ inline void fwrite_fully(const void* ptr, size_t size, size_t count, size_t written = std::fwrite(ptr, size, count, stream); if (written < count) FMT_THROW(system_error(errno, "cannot write to file")); } -} // namespace detail - -#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) -namespace detail { +#ifndef FMT_STATIC_THOUSANDS_SEPARATOR template locale_ref::locale_ref(const Locale& loc) : locale_(&loc) { static_assert(std::is_same::value, ""); @@ -192,19 +189,18 @@ template FMT_FUNC Char decimal_point_impl(locale_ref loc) { return std::use_facet>(loc.get()) .decimal_point(); } -} // namespace detail #else -template -FMT_FUNC std::string detail::grouping_impl(locale_ref) { +template FMT_FUNC std::string grouping_impl(locale_ref) { return "\03"; } -template FMT_FUNC Char detail::thousands_sep_impl(locale_ref) { +template FMT_FUNC Char thousands_sep_impl(locale_ref) { return FMT_STATIC_THOUSANDS_SEPARATOR; } -template FMT_FUNC Char detail::decimal_point_impl(locale_ref) { +template FMT_FUNC Char decimal_point_impl(locale_ref) { return '.'; } #endif +} // namespace detail FMT_API FMT_FUNC format_error::~format_error() FMT_NOEXCEPT = default; FMT_API FMT_FUNC system_error::~system_error() FMT_NOEXCEPT = default;