Skip to content

Commit

Permalink
fix #2118: FMT_COMPILE did not work with tm formatter (#2119)
Browse files Browse the repository at this point in the history
Co-authored-by: summivox <[email protected]>
  • Loading branch information
summivox and summivox authored Jan 30, 2021
1 parent 2a25e2b commit 1980ca8
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 1980ca8

Please sign in to comment.