Skip to content
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

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Conversation

phprus
Copy link
Contributor

@phprus phprus commented Oct 14, 2022

Fix for issue #3140.

Copy link
Contributor

@vitaut vitaut left a 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.

@@ -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>
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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>
@vitaut vitaut merged commit 51d3685 into fmtlib:master Oct 14, 2022
@vitaut
Copy link
Contributor

vitaut commented Oct 14, 2022

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants