public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114240] sys_days not being parsed with only a date in the stream Date: Tue, 05 Mar 2024 15:25:40 +0000 [thread overview] Message-ID: <bug-114240-4-WeLRhOt0vc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114240-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- 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. template<typename _CharT, typename _Traits, typename _Duration, typename _Alloc = allocator<_CharT>> basic_istream<_CharT, _Traits>& from_stream(basic_istream<_CharT, _Traits>& __is, const _CharT* __fmt, sys_time<_Duration>& __tp, basic_string<_CharT, _Traits, _Alloc>* __abbrev = nullptr, minutes* __offset = nullptr) { minutes __off{}; if (!__offset) __offset = &__off; using __format::_ChronoParts; auto __need = _ChronoParts::_Year | _ChronoParts::_Month | _ChronoParts::_Day | _ChronoParts::_TimeOfDay; This should depend on _Duration::period.
next prev parent reply other threads:[~2024-03-05 15:25 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-05 15:11 [Bug libstdc++/114240] New: " howard.hinnant at gmail dot com 2024-03-05 15:21 ` [Bug libstdc++/114240] " redi at gcc dot gnu.org 2024-03-05 15:25 ` redi at gcc dot gnu.org [this message] 2024-03-05 15:31 ` howard.hinnant at gmail dot com 2024-03-05 15:53 ` redi at gcc dot gnu.org 2024-03-06 21:28 ` redi at gcc dot gnu.org 2024-03-07 0:10 ` redi at gcc dot gnu.org 2024-03-08 10:45 ` redi at gcc dot gnu.org 2024-03-09 0:29 ` cvs-commit at gcc dot gnu.org 2024-03-09 0:33 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-114240-4-WeLRhOt0vc@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).