libstdc++: Fix %S format of duration with floating-point rep
commit2ef5200a6fb7311074904a1b4bf7ce750618a068
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Dec 2023 15:26:42 +0000 (14 15:26 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 14 Dec 2023 22:04:42 +0000 (14 22:04 +0000)
tree0467a2810a7a45748cad8ac3d67c940542c4d477
parentae034b9106fbdd855ec22ce221bb61a1a9a532c3
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.
libstdc++-v3/include/bits/chrono_io.h
libstdc++-v3/testsuite/20_util/duration/io.cc