]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix %S format of duration with floating-point rep
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Dec 2023 15:26:42 +0000 (15:26 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 15 Dec 2023 11:33:17 +0000 (11:33 +0000)
commit354d684ee933e9638206d62e37204f6e63515125
tree0f198b85fd045b61830af33a607ad900d314f443
parent013dd6ab1ca2a04165f3d1f90d498ae66a09058a
libstdc++: Fix %S format of duration with floating-point rep

I got the order of arguments to std::format_to wrong. It was in a
discarded statement, for a case which wasn't being tested.

libstdc++-v3/ChangeLog:

* include/bits/chrono_io.h (__formatter_chrono::_M_S): Fix order
of arguments to std::format_to.
* testsuite/20_util/duration/io.cc: Test subsecond duration with
floating-point rep.

(cherry picked from commit 2ef5200a6fb7311074904a1b4bf7ce750618a068)
libstdc++-v3/include/bits/chrono_io.h
libstdc++-v3/testsuite/20_util/duration/io.cc