https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104167
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:ce6c4d3b4d336493cab128795467d832cb04c9ee commit r14-3165-gce6c4d3b4d336493cab128795467d832cb04c9ee Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Jul 21 17:19:08 2023 +0100 libstdc++: Implement C++20 std::chrono::parse [PR104167] This adds the missing C++20 features to <chrono>. I've implemented my proposed resolutions to LWG issues 3960, 3961, and 3962. There are some unimplemented flags such as %OI which I think are not implementable in general. It might be possible to use na_llanginfo with ALT_DIGITS, but that isn't available on all targets. I intend to file another LWG issue about that. libstdc++-v3/ChangeLog: PR libstdc++/104167 * include/bits/chrono_io.h (operator|=, operator|): Add noexcept to _ChronoParts operators. (from_stream, parse): Define new functions. (__detail::_Parse, __detail::_Parser): New class templates. * include/std/chrono (__cpp_lib_chrono): Define to 201907L for C++20. * include/std/version (__cpp_lib_chrono): Likewise. * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: Adjust expected value of feature test macro. * testsuite/20_util/duration/io.cc: Test parsing. * testsuite/std/time/clock/file/io.cc: Likewise. * testsuite/std/time/clock/gps/io.cc: Likewise. * testsuite/std/time/clock/system/io.cc: Likewise. * testsuite/std/time/clock/tai/io.cc: Likewise. * testsuite/std/time/clock/utc/io.cc: Likewise. * testsuite/std/time/day/io.cc: Likewise. * testsuite/std/time/month/io.cc: Likewise. * testsuite/std/time/month_day/io.cc: Likewise. * testsuite/std/time/weekday/io.cc: Likewise. * testsuite/std/time/year/io.cc: Likewise. * testsuite/std/time/year_month/io.cc: Likewise. * testsuite/std/time/year_month_day/io.cc: Likewise. * testsuite/std/time/syn_c++20.cc: Check value of macro and for the existence of parse and from_stream in namespace chrono. * testsuite/std/time/clock/local/io.cc: New test. * testsuite/std/time/parse.cc: New test.