From dcc14761f34f9a9c8a6ed8f0f4e276fa8ef4d950 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 2 Jun 2025 23:25:43 +0100 Subject: [PATCH] libstdc++: Check feature test macro for jthread in Check the appropriate feature test macro instead of checking that __cplusplus >= 201703L. libstdc++-v3/ChangeLog: * include/std/stop_token: Check __glibcxx_jthread instead of __cplusplus. --- libstdc++-v3/include/std/stop_token | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/include/std/stop_token b/libstdc++-v3/include/std/stop_token index 1225b3afd275..775ec6aa207d 100644 --- a/libstdc++-v3/include/std/stop_token +++ b/libstdc++-v3/include/std/stop_token @@ -34,8 +34,7 @@ #define __glibcxx_want_jthread #include -#if __cplusplus > 201703L - +#ifdef __glibcxx_jthread // C++ >= 20 #include #include @@ -650,6 +649,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION stop_callback(stop_token, _Callback) -> stop_callback<_Callback>; _GLIBCXX_END_NAMESPACE_VERSION -} // namespace -#endif // __cplusplus > 201703L +} // namespace std +#endif // __glibcxx_jthread #endif // _GLIBCXX_STOP_TOKEN -- 2.47.3