Skip to content

Conversation

@vmichal
Copy link
Contributor

@vmichal vmichal commented Nov 21, 2025

Constrain operator<<(basic_ostream, chrono::local_time), require validity of underlying expression.
Add tests.

Fixes #5854

Note: I've noticed that more often than not, requires clauses in the STL code are written before the function name, repeating the parameter list when necessary. I have placed the constraint after the function name and omitted the repetition of the parameter list. Please let me know whether this is preferred or not.

@vmichal vmichal requested a review from a team as a code owner November 21, 2025 12:20
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Nov 21, 2025
@StephanTLavavej StephanTLavavej added LWG Library Working Group issue chrono C++20 chrono labels Nov 21, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Nov 24, 2025
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Nov 25, 2025
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Copy link
Member

I've resolved a trivial adjacent-add conflict with #5893 in P0355R7_calendars_and_time_zones_formatting.

@StephanTLavavej StephanTLavavej merged commit 1248f54 into microsoft:main Nov 27, 2025
45 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Nov 27, 2025
@StephanTLavavej
Copy link
Member

⏱️ 📆 😸

@vmichal vmichal deleted the constrain-stream-insertion-chrono_local_time branch November 28, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chrono C++20 chrono LWG Library Working Group issue

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

LWG-4257 Stream insertion for chrono::local_time should be constrained

2 participants