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
* [Bug libstdc++/108265] chrono::hh_mm_ss can't be constructed from unsigned durations
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 ` redi at gcc dot gnu.org
2023-01-05 0:51 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-04 11:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Last reconfirmed| |2023-01-04
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |11.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/108265] chrono::hh_mm_ss can't be constructed from unsigned durations
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
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-05 0:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:e36e57b032b2d70eaa1294d5921e4fd8ce12a74d
commit r13-5002-ge36e57b032b2d70eaa1294d5921e4fd8ce12a74d
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Jan 4 16:43:51 2023 +0000
libstdc++: Fix std::chrono::hh_mm_ss with unsigned rep [PR108265]
libstdc++-v3/ChangeLog:
PR libstdc++/108265
* include/std/chrono (hh_mm_ss): Do not use chrono::abs if
duration rep is unsigned.
* testsuite/std/time/hh_mm_ss/1.cc: Check unsigned rep.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/108265] chrono::hh_mm_ss can't be constructed from unsigned durations
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
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-05 0:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/108265] chrono::hh_mm_ss can't be constructed from unsigned durations
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
` (2 preceding siblings ...)
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
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-05 12:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:ebb1f6d14c2fef2e4e4aab30525279524c8f9145
commit r12-9030-gebb1f6d14c2fef2e4e4aab30525279524c8f9145
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Jan 4 16:43:51 2023 +0000
libstdc++: Fix std::chrono::hh_mm_ss with unsigned rep [PR108265]
libstdc++-v3/ChangeLog:
PR libstdc++/108265
* include/std/chrono (hh_mm_ss): Do not use chrono::abs if
duration rep is unsigned. Remove incorrect noexcept-specifier.
* testsuite/std/time/hh_mm_ss/1.cc: Check unsigned rep. Check
floating-point representations. Check default construction.
(cherry picked from commit e36e57b032b2d70eaa1294d5921e4fd8ce12a74d)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/108265] chrono::hh_mm_ss can't be constructed from unsigned durations
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
` (3 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-05 12:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
and for 12.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/108265] chrono::hh_mm_ss can't be constructed from unsigned durations
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
` (4 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-16 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:126ffcee89cf3f252c0c89125a64fbe1b0b9255e
commit r11-10767-g126ffcee89cf3f252c0c89125a64fbe1b0b9255e
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Jan 4 16:43:51 2023 +0000
libstdc++: Fix std::chrono::hh_mm_ss with unsigned rep [PR108265]
libstdc++-v3/ChangeLog:
PR libstdc++/108265
* include/std/chrono (hh_mm_ss): Do not use chrono::abs if
duration rep is unsigned. Remove incorrect noexcept-specifier.
* testsuite/std/time/hh_mm_ss/1.cc: Check unsigned rep. Check
floating-point representations. Check default construction.
(cherry picked from commit e36e57b032b2d70eaa1294d5921e4fd8ce12a74d)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/108265] chrono::hh_mm_ss can't be constructed from unsigned durations
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
` (5 preceding siblings ...)
2023-05-16 12:50 ` cvs-commit at gcc dot gnu.org
@ 2023-05-16 15:02 ` redi at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-05-16 15:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108265
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And now for 11.4 too.
^ 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).