aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-12-22 01:29:22 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-12-22 23:34:27 +0000
commitf99b94865fa629cc2cc937128a812b6a23038446 (patch)
tree8552c2e3d872bf3432094f40b36a958e79919d21 /gcc
parent9247402a29d73dc09830a48d39a27768d40e46e0 (diff)
downloadgcc-f99b94865fa629cc2cc937128a812b6a23038446.zip
gcc-f99b94865fa629cc2cc937128a812b6a23038446.tar.gz
gcc-f99b94865fa629cc2cc937128a812b6a23038446.tar.bz2
libstdc++: Add std::format support to <chrono>
This adds the operator<< overloads and std::formatter specializations required by C++20 so that <chrono> types can be written to ostreams and printed with std::format. libstdc++-v3/ChangeLog: * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/std/chrono (operator<<): Move to new header. (nonexistent_local_time::_M_make_what_str): Define correctly. (ambiguous_local_time::_M_make_what_str): Likewise. * include/bits/chrono_io.h: New file. * src/c++20/tzdb.cc (operator<<(ostream&, const Rule&)): Use new ostream output for month and weekday types. * testsuite/20_util/duration/io.cc: Test std::format support. * testsuite/std/time/exceptions.cc: Check what() strings. * testsuite/std/time/syn_c++20.cc: Uncomment local_time_format. * testsuite/std/time/time_zone/get_info_local.cc: Enable check for formatted output of local_info objects. * testsuite/std/time/clock/file/io.cc: New test. * testsuite/std/time/clock/gps/io.cc: New test. * testsuite/std/time/clock/system/io.cc: New test. * testsuite/std/time/clock/tai/io.cc: New test. * testsuite/std/time/clock/utc/io.cc: New test. * testsuite/std/time/day/io.cc: New test. * testsuite/std/time/format.cc: New test. * testsuite/std/time/hh_mm_ss/io.cc: New test. * testsuite/std/time/month/io.cc: New test. * testsuite/std/time/weekday/io.cc: New test. * testsuite/std/time/year/io.cc: New test. * testsuite/std/time/year_month_day/io.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions