https://gcc.gnu.org/g:5c618aaec5dbb7dc9fe12b0cb25bbbe553484295
commit r17-6235-g5c618aaec5dbb7dc9fe12b0cb25bbbe553484295 Author: Jonathan Wakely <[email protected]> Date: Fri Nov 13 11:20:37 2026 +0000 libstdc++: Use specific feature test macro for parallel algos in <numeric> libstdc++-v3/ChangeLog: * include/std/algorithm: Add comment to #endif. * include/std/numeric: Use __cpp_lib_parallel_algorithm feature test macro instead of __cplusplus and _GLIBCXX_HOSTED. Diff: --- libstdc++-v3/include/std/algorithm | 2 +- libstdc++-v3/include/std/numeric | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/std/algorithm b/libstdc++-v3/include/std/algorithm index a050a731ed5c..c3e433334fea 100644 --- a/libstdc++-v3/include/std/algorithm +++ b/libstdc++-v3/include/std/algorithm @@ -91,7 +91,7 @@ # include <pstl/glue_algorithm_defs.h> # define _PSTL_ALGORITHM_FORWARD_DECLARED 1 # endif -#endif +#endif // __cpp_lib_parallel_algorithm #ifdef _GLIBCXX_PARALLEL # include <parallel/algorithm> diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric index a54449ca4936..6dbea81e846d 100644 --- a/libstdc++-v3/include/std/numeric +++ b/libstdc++-v3/include/std/numeric @@ -850,7 +850,7 @@ namespace ranges _GLIBCXX_END_NAMESPACE_VERSION } // namespace std -#if __cplusplus >= 201703L && _GLIBCXX_HOSTED +#if __cpp_lib_parallel_algorithm // C++ >= 17 && HOSTED // Parallel STL algorithms # if _PSTL_EXECUTION_POLICIES_DEFINED // If <execution> has already been included, pull in implementations @@ -860,6 +860,6 @@ _GLIBCXX_END_NAMESPACE_VERSION # include <pstl/glue_numeric_defs.h> # define _PSTL_NUMERIC_FORWARD_DECLARED 1 # endif -#endif // C++17 +#endif // __cpp_lib_parallel_algorithm #endif /* _GLIBCXX_NUMERIC */
