diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index b24cef9a4d31..86f2e7ce4c5e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -289,6 +289,11 @@ inline null<> localtime_s(...) { return null<>(); } inline null<> gmtime_r(...) { return null<>(); } inline null<> gmtime_s(...) { return null<>(); } +inline const std::locale& get_classic_locale() { + static const auto& locale = std::locale::classic(); + return locale; +} + template inline auto do_write_localized(const std::tm& time, const std::locale& loc, char format, char modifier) @@ -310,11 +315,6 @@ auto write_localized(OutputIt out, const std::tm& time, const std::locale& loc, return std::copy(str.begin(), str.end(), out); } -inline const std::locale& get_classic_locale() { - static const auto& locale = std::locale::classic(); - return locale; -} - template ::value)> auto write_localized(OutputIt out, const std::tm& time, const std::locale& loc,