public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/108265] New: chrono::hh_mm_ss can't be constructed from unsigned durations
@ 2023-01-02 16:17 mwd at md5i dot com
  2023-01-04 11:32 ` [Bug libstdc++/108265] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mwd at md5i dot com @ 2023-01-02 16:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265

            Bug ID: 108265
           Summary: chrono::hh_mm_ss can't be constructed from unsigned
                    durations
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mwd at md5i dot com
  Target Milestone: ---

chrono::hh_mm_ss can't be constructed from unsigned durations.

For example:

  #include <chrono>

  int main()
  {
    std::chrono::duration<unsigned> dur{};
    auto hms = std::chrono::hh_mm_ss(dur);
  }

This fails because the hh_mm_ss constructor calls chrono::abs on the passed in
duration, and chrono::abs doesn't participate in overload resolution when the
duration is unsigned.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-16 15:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 16:17 [Bug libstdc++/108265] New: chrono::hh_mm_ss can't be constructed from unsigned durations mwd at md5i dot com
2023-01-04 11:32 ` [Bug libstdc++/108265] " redi at gcc dot gnu.org
2023-01-05  0:51 ` cvs-commit at gcc dot gnu.org
2023-01-05  0:54 ` redi at gcc dot gnu.org
2023-01-05 12:07 ` cvs-commit at gcc dot gnu.org
2023-01-05 12:08 ` redi at gcc dot gnu.org
2023-05-16 12:50 ` cvs-commit at gcc dot gnu.org
2023-05-16 15:02 ` redi at gcc dot gnu.org

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).