https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120565

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tomasz Kaminski <tkami...@gcc.gnu.org>:

https://gcc.gnu.org/g:6dcba678030181527c6010551387917b8d734904

commit r16-1205-g6dcba678030181527c6010551387917b8d734904
Author: Tomasz KamiÅski <tkami...@redhat.com>
Date:   Fri Jun 6 09:07:49 2025 +0200

    libstdc++: Support wide characters output for sys_info and local_info
[PR120565]

    Formatting sys_info as wchar_t require widening of the abbrev (zone)
member.
    To support that we reuse the existing code in support for '%Z' specifier,
for
    local_time_format, and produce output using singe format call with
    "[{0:%F %T},{1:%F %T},{2:%T},{3:%Q%q},{0:%Z}]" format string. As noted in
the
    comment, produced output is locale independed, as it does not contain
decimal
    separtors.

    For sys_info, the outputed literals are widended using _GLIBCXX_WIDEN,
except
    opening and closing brackets, that are fetched from __format::_Separators.

            PR libstdc++/120565

    libstdc++-v3/ChangeLog:

            * include/bits/chrono_io.h
            (operator<<(basic_ostream<_CharT, _Traits>&, const sys_info&))
            (operator<<(basic_ostream<_CharT, _Traits>&, const local_info&)):
            Support wchar_t as _CharT.
            * testsuite/std/time/format/empty_spec.cc: Instantiated test_infos
for
            wchar_t and increase timeout.

    Reviewed-by: Jonathan Wakely <jwak...@redhat.com>
    Signed-off-by: Tomasz KamiÅski <tkami...@redhat.com>

Reply via email to