STL icon indicating copy to clipboard operation
STL copied to clipboard

Implement LWG-4274: The chrono::hh_mm_ss constructor is ill-formed for unsigned durations

Open vmichal opened this issue 1 month ago • 2 comments

Replace call to chrono::abs in chrono::hh_mm_ss ctor with new private function handling duration with unsigned rep. Add tests.

Fixes #5857

vmichal avatar Nov 21 '25 09:11 vmichal

Thank you for these LWG PRs - I will try to sneak in a few reviews despite needing to prioritize flat_meow. Just wanted to let you know that I'm not ignoring them and I appreciate all the work (it's just arrived at an exceptionally busy time for me).

StephanTLavavej avatar Nov 21 '25 22:11 StephanTLavavej

Looks like that this PR should also fix #4144 and #5569.

frederick-vs-ja avatar Nov 22 '25 01:11 frederick-vs-ja

Looks like that this PR should also fix #4144 and #5569.

Thanks for the suggestion, I will check them thoroughly (on the first glance they indeed seem fixed) soon. If they indeed were fixed, I will add them to the list.

vmichal avatar Nov 23 '25 09:11 vmichal

I took examples from both issues and added them as tests. Indeed, both should also be resolved by this PR.

vmichal avatar Nov 23 '25 12:11 vmichal

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

StephanTLavavej avatar Nov 25 '25 18:11 StephanTLavavej

Thanks for implementing this LWG issue, and congratulations on your first microsoft/STL commit! :tada: :smile_cat: :black_cat:

StephanTLavavej avatar Nov 27 '25 19:11 StephanTLavavej