Skip to content

Commit

Permalink
fix #2118: FMT_COMPILE did not work with tm formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
summivox committed Jan 30, 2021
1 parent b0b56b4 commit d2d01c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ template <typename Char> struct formatter<std::tm, Char> {
}

template <typename FormatContext>
auto format(const std::tm& tm, FormatContext& ctx) -> decltype(ctx.out()) {
auto format(const std::tm& tm, FormatContext& ctx) const
-> decltype(ctx.out()) {
basic_memory_buffer<Char> tm_format;
tm_format.append(specs.begin(), specs.end());
tm_format.push_back('\0');
Expand Down

0 comments on commit d2d01c9

Please sign in to comment.