[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #7 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:3e8ee03edd018eed43444755f601cdb9d5931654 commit r14-9406-g3e8ee03edd018eed43444755f601cdb9d5931654 Author: Jonathan Wakely Date:

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #6 from Jonathan Wakely --- Actually the standard does support Howard's intended behaviour: "If the parse fails to decode a valid date, is.setstate(ios_base::failbit) is called and tp is not modified." It says "date", not "time poi

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #5 from Jonathan Wakely --- >using __format::_ChronoParts; >auto __need = _ChronoParts::_Year | _ChronoParts::_Month > - | _ChronoParts::_Day | _ChronoParts::_TimeOfDay; > + | _Chro

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #4 from Jonathan Wakely --- This has revealed another bug in some of the from_stream overloads, due to Clock::from_sys / Clock::from_utc sometimes returning a higher precision value than the input argument (due to using the common_ty

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #3 from Jonathan Wakely --- So this would fix it: --- a/libstdc++-v3/include/bits/chrono_io.h +++ b/libstdc++-v3/include/bits/chrono_io.h @@ -2826,7 +2826,9 @@ namespace __detail __offset = &__off; using __format::_Ch

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-05 Thread howard.hinnant at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #2 from Howard Hinnant --- In my date lib I just presumed 00:00:00 time of day when parsing time_points, unless the parse produced another time of day. Though I must admit that this didn't come through in the spec. So there is a li

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #1 from Jonathan Wakely --- I think the problem is that I just have some generic logic that assumes all sys_time specializations are a date time, and so require both a date and a time. But obviously for sys_days we only need a date.

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2024-03-05 Ever confirmed|0