Skip to content

Commit

Permalink
Remove duplicate template parameter.
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <[email protected]>
  • Loading branch information
phprus committed Oct 14, 2022
1 parent 9254cfa commit c5841d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -2052,16 +2052,17 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> {
}
};

template <typename Char, typename Duration>
struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
template <typename Rep, typename Period, typename Char>
struct formatter<std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<Rep, Period>>,
Char> : formatter<std::tm, Char> {
FMT_CONSTEXPR formatter() {
basic_string_view<Char> default_specs =
detail::string_literal<Char, '%', 'F', ' ', '%', 'T'>{};
this->do_parse(default_specs.begin(), default_specs.end());
}

template <typename FormatContext, typename Rep, typename Period>
template <typename FormatContext>
auto format(std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<Rep, Period>>
val,
Expand Down Expand Up @@ -2090,7 +2091,7 @@ struct formatter<std::chrono::time_point<std::chrono::utc_clock, Duration>,
Char>
: formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
Char> {
template <typename FormatContext, typename Duration>
template <typename FormatContext>
auto format(std::chrono::time_point<std::chrono::utc_clock, Duration> val,
FormatContext& ctx) const -> decltype(ctx.out()) {
return formatter<
Expand Down

0 comments on commit c5841d1

Please sign in to comment.