[committed,2/2] libstdc++: Use 202100L as feature test check for C++23
Checks
Commit Message
Tested x86_64-linux. Pushed to trunk.
-- >8 --
I noticed that our C++23 features were not being defined when using
Clang 16 with -std=c++2b, because it only defines __cplusplus=202101L
but <bits/version.h> uses 202302L since my r14-3252-g0c316669b092fb
change.
This changes <bits/version.h> to use 202100 instead of the final 202302
value so that we support Clang 16's -std=c++2b mode.
libstdc++-v3/ChangeLog:
* include/bits/version.def (stds): Use >= 202100 for C++23
condition.
* include/bits/version.h: Regenerate.
* include/std/thread: Use > C++20 instead of >= C++23 for
__cplusplus condition.
---
libstdc++-v3/include/bits/version.def | 2 +-
libstdc++-v3/include/bits/version.h | 76 +++++++++++++--------------
libstdc++-v3/include/std/thread | 2 +-
3 files changed, 40 insertions(+), 40 deletions(-)
@@ -1640,7 +1640,7 @@ stds[11] = ">= 201103L";
stds[14] = ">= 201402L";
stds[17] = ">= 201703L";
stds[20] = ">= 202002L";
-stds[23] = ">= 202302L";
+stds[23] = ">= 202100L"; // Should be 202302L but Clang 16 uses 202101L
stds[26] = "> 202302L"; // TODO: update when finalized
// Local Variables:
@@ -42,7 +42,7 @@
# include <stop_token> // std::stop_source, std::stop_token, std::nostopstate
#endif
-#if __cplusplus >= 202302L
+#if __cplusplus > 202002L
# include <format>
#endif