diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 6e1fba4f1ffbb..439cdbd210c3d 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(const std::tm& time, const std::locale& loc, char format, char modifier) -> std::basic_string { @@ -309,11 +314,6 @@ auto write(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(OutputIt out, const std::tm& time, const std::locale& loc,