-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix handling of locale in chrono formatters #1892
Conversation
How about you put a test on it |
tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp
Outdated
Show resolved
Hide resolved
Needs tests, and also probably needs ABI mitigations (that would involve changing mangled names). Also I don't want to merge this before the LWG issue is approved, it's somewhat of a design change and I'm not sure LWG will adopt the issue. |
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! Aside from ABI renaming and stylistic nitpicks, this looks good to me.
tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp
Outdated
Show resolved
Hide resolved
Switched ostream insertion operators back to using locale per LEWG request and implemented two drive-by fixes:
Also added tests for insertion operators. Note that item 1 is currently untestable (there is no observable change) because |
We can't merge this until the paper has been forwarded out of LWG, however we're happy to keep the PR open and continue reviewing changes. |
Here's hoping that this paper gets through LWG swiftly 😸 |
The paper has been voted into the WP: #2237 |
I don't plan to work on this PR (although it should be mostly ready), hopefully someone will take over. |
I'll get this past the finish line now that it's been voted in. Are you OK with just reopening this PR (and me pushing into it) or do you want to avoid github notifications and have me pick out the commits into a new PR. |
Unfortunately I already removed the repo this PR originated from so I can't reopen. Please create a new PR. |
Make chrono formatting locale-independent by default and add the
L
specifier for consistency with all other standard formatters. Resolves https://cplusplus.github.io/LWG/issue3547 and #1891.For example: