]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement new SI prefixes in <ratio> for C++23 (P2734R0)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 23 Aug 2023 14:51:49 +0000 (15:51 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 24 Aug 2023 12:44:38 +0000 (13:44 +0100)
commitc47430bba62a49a2ca10c99380ce87ceafca8e68
treeb4b05bb7de77e791655255f1a65ae03dd2199236
parentd96659e34cdcf43640541e1b7401ac546e0d1bf5
libstdc++: Implement new SI prefixes in <ratio> for C++23 (P2734R0)

This is a no-op for libstdc++, because our intmax_t is a 64-bit type and
so is incapable of representing the largest and smallest ratios from
C++11, let alone the new ones. I've added them to the file anyway (and
defined the feature test macro) so that if somebody ports libstdc++ to a
target with 128-bit intmax_t then they'll be present.

libstdc++-v3/ChangeLog:

* include/bits/version.def (__cpp_lib_ratio): Define.
* include/bits/version.h: Regenerate.
* include/std/ratio (quecto, ronto, yocto, zepto)
(zetta, yotta, ronna, quetta): Define.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Adjust
dg-error line numbers.
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/include/std/ratio
libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc