diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-07-21 17:19:08 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-08-11 19:58:06 +0100 |
commit | ce6c4d3b4d336493cab128795467d832cb04c9ee (patch) | |
tree | fa0234779601b85d60d3003ecb8fd911f3b7fd46 /libgcc | |
parent | f93a612fc4567652b75ffc916d31a446378e6613 (diff) | |
download | gcc-ce6c4d3b4d336493cab128795467d832cb04c9ee.zip gcc-ce6c4d3b4d336493cab128795467d832cb04c9ee.tar.gz gcc-ce6c4d3b4d336493cab128795467d832cb04c9ee.tar.bz2 |
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.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions