aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/nds32
diff options
context:
space:
mode:
authorTomasz Kamiński <tkaminsk@redhat.com>2025-06-06 11:32:27 +0200
committerTomasz Kamiński <tkaminsk@redhat.com>2025-06-12 16:26:04 +0200
commit8fa1e98493def5eb327397a587aa846f2145d634 (patch)
tree9d9bcb7ec185ae32fc961d60a924136c4e352e1d /libgcc/config/nds32
parent83a878c31b4f20d00638e44d689b04669247b0ed (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
libstdc++: Format empty chrono-spec for the time points and hh_mm_ss directly.HEADtrunkmaster
This patch change implementation of the formatters for time points and hh_mm_ss, so they no longer delegate to operator<< for ostream in case of empty chrono-spec. As in case of calendar types, the formatters for specific type now provide __formatter_chrono with default _ChronoSpec that are used in case if empty chrono-spec. The configuration of __defSpec is straight forward, except for the sys_time, and local_time that print time, if the duration is convertible to days, which is equivalent to setting _M_chrono_specs "%F" instead of "%F %T". Furthermore, certain sys_time<Dur> do not support ostream operator, and should not be formattable with empty spec - in such case default _M_chrono_spec, allowing the issue to still be detected in _M_parse. Finally, _ChronoFormats are extended to cover required format strings. libstdc++-v3/ChangeLog: * include/bits/chrono_io.h (_ChronoFormats::_S_ftz) (_ChronoFormats::_S_ft, _ChronoFormats::_S_t): Define. (__formatter_chrono::_M_format_to_ostream): Remove handling for time_points. (std::formatter<chrono::hh_mm_ss<_Dur>, _CharT>) (std::formatter<chrono::sys_time<_Dur>, _CharT>) (std::formatter<chrono::utc_time<_Dur>, _CharT>) (std::formatter<chrono::tai_time<_Dur>, _CharT>) (std::formatter<chrono::gps_time<_Dur>, _CharT>) (std::formatter<chrono::file_time<_Dur>, _CharT>) (std::formatter<chrono::local_time<_Dur>, _CharT>) (std::formatter<chrono::__detail::__local_time_fmt<_Dur>, _CharT>) (std::formatter<chrono::zoned_time<_Dur>, _CharT>): Define __defSpec, and pass it as argument to _M_prase and constructor of __formatter_chrono.
Diffstat (limited to 'libgcc/config/nds32')
0 files changed, 0 insertions, 0 deletions