aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTomasz Kamiński <tkaminsk@redhat.com>2025-05-05 16:32:58 +0200
committerTomasz Kamiński <tkaminsk@redhat.com>2025-05-07 12:14:51 +0200
commit52f6ab55051ff43fd1b40ff06d9501043f8ba844 (patch)
treed5147bb12ef66988acd498c7f048d7727f58c4f7 /libjava
parent83ef989ee189902ca1d434feb0f3dd50519e92cb (diff)
downloadgcc-52f6ab55051ff43fd1b40ff06d9501043f8ba844.zip
gcc-52f6ab55051ff43fd1b40ff06d9501043f8ba844.tar.gz
gcc-52f6ab55051ff43fd1b40ff06d9501043f8ba844.tar.bz2
libstdc++: Fix width computation for the chrono formatting [PR120114]
Use `__unicode::_field_width` to compute the field width of the output when writting the formatted output for std::chrono::types. This applies both to characters copied from format string, and one produced by localized formatting. We also use _Str_sink::view() instead of get(), which avoids copying the content of the buffer to std::string in case of small output. PR libstdc++/120114 libstdc++-v3/ChangeLog: * include/bits/chrono_io.h (__formatter_chrono::_M_format): Use __field_width. * testsuite/std/time/format/pr120114.cc: New test. Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
Diffstat (limited to 'libjava')
0 files changed, 0 insertions, 0 deletions