]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Move tai_- and gps_clock::now impls out of ABI
authorNathan Myers <ncm@cantrip.org>
Thu, 21 Aug 2025 00:24:29 +0000 (20:24 -0400)
committerNathan Myers <ncm@cantrip.org>
Wed, 27 Aug 2025 13:50:33 +0000 (09:50 -0400)
commit806de30f51c8b959d031b375ec13343c20b864cf
tree701de19c500f36d6d9c4ed0dd4b9ca7dcfb42f5a
parent5de587c1f7afa2f7a619441a7b8887853662a655
libstdc++: Move tai_- and gps_clock::now impls out of ABI

This patch moves std::tai_clock::now() and std::tai_clock::now()
definitions from header inlines to static members invoked via a
normal function call, in service of stabilizing the C++20 ABI.

It also changes #if guards to mention the actual __cpp_lib_*
feature gated, not just the language version, for clarity.

New global function symbols std::chrono::tai_clock::now
and std::chrono::gps_clock::now are exported.

libstdc++-v3/ChangeLog:
* include/std/chrono (gps_clock::now, tai_clock::now): Remove
inline definitions.
* src/c++20/clock.cc (gps_clock::now, tai_clock::now): New file
for out-of-line now() impls.
* src/c++20/Makefile.am: Mention clock.cc.
* src/c++20/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: add mangled now() symbols.
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/include/std/chrono
libstdc++-v3/src/c++20/Makefile.am
libstdc++-v3/src/c++20/Makefile.in
libstdc++-v3/src/c++20/clock.cc [new file with mode: 0644]