-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplicate template parameter. #3142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
include/fmt/chrono.h
Outdated
@@ -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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change template parameters? I suggest keeping the old ones at least for consistency with utc formatter and change the format
function instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need Rep
and Period
types for the condition on lines 2070-2071.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but these are available as Duration::rep
and Duration::period
. I don't think we need them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
c5841d1
to
1d7b97a
Compare
Merged, thanks! |
Fix for issue #3140.