https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110512
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- The proposed change will compile very slowly, something like this would be better: --- a/libstdc++-v3/include/pstl/execution_impl.h +++ b/libstdc++-v3/include/pstl/execution_impl.h @@ -19,13 +19,24 @@ namespace __pstl { namespace __internal { +#if __glibcxx_concepts +template<typename _Iter> + concept __is_random_access_iter + = std::is_base_of_v<std::random_access_iterator_tag, + std::__iter_category_t<_Iter>> + || std::random_access_iterator<_Iter>; +template <typename... _IteratorTypes> + using __are_random_access_iterators + = std::bool_constant<(__is_random_access_iter<_IteratorTypes> && ...)>; +#else template <typename _IteratorTag, typename... _IteratorTypes> using __are_iterators_of = std::conjunction< std::is_base_of<_IteratorTag, typename std::iterator_traits<std::decay_t<_IteratorTypes>>::iterator_category>...>; template <typename... _IteratorTypes> using __are_random_access_iterators = __are_iterators_of<std::random_access_iterator_tag, _IteratorTypes...>; +#endif struct __serial_backend_tag { This uses the libstdc++ helper __iter_category_t but since we no longer need to sync with upstream, that seems fine.