Fix fmt::localtime formatting not working in wide-char string contexts

This commit is contained in:
Yuval Gamzon-Kapeller
2021-02-13 06:53:30 -08:00
committed by Victor Zverovich
parent e6ef927e6b
commit c5979d564e
2 changed files with 20 additions and 7 deletions
+2 -1
View File
@@ -413,7 +413,8 @@ struct formatter<std::chrono::time_point<std::chrono::system_clock>, Char>
};
template <typename Char> struct formatter<std::tm, Char> {
FMT_CONSTEXPR auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
template <typename ParseContext>
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin();
if (it != ctx.end() && *it == ':') ++it;
auto end = it;