Landing: 5a457c7ba71b
Project / Subsystem
gcc / libstdc++
Date
2026-07-29
Author
Jonathan Wakely
Commit
5a457c7ba71bebfa1c07a4d4bba8a13b03bba2f4
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 5a457c7ba71bebfa1c07a4d4bba8a13b03bba2f4
- source_type
- github
- headline
- chrono::parse accepts out-of-range values not needed by target type
- tldr
- `chrono::parse` now correctly handles out-of-range time values when they are not required by the target type, preventing unnecessary parse failures.
- author
- Jonathan Wakely
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • chrono
- • parsing
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-29T00:00:00.000Z
The chrono::parse function now correctly handles out-of-range hour and minute values when parsing time strings, such as those using %R or %T. Previously, it would prematurely fail the parse operation even if the target type, like chrono::year_month_day, did not strictly require those specific hour/minute values. The fix ensures parsing continues, and failbit is only set if subsequent parsing fails or if the value is truly needed and out of range.