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.
The proposed change will compile very slowly, something like this would be better:
--- a/libstdc+ +-v3/include/ pstl/execution_ impl.h +-v3/include/ pstl/execution_ impl.h access_ iter base_of_ v<std:: random_ access_ iterator_ tag, iter_category_ t<_Iter> > access_ iterator< _Iter>;
+++ b/libstdc+
@@ -19,13 +19,24 @@ namespace __pstl
{
namespace __internal
{
+#if __glibcxx_concepts
+template<typename _Iter>
+ concept __is_random_
+ = std::is_
+ std::__
+ || std::random_
+template <typename... _IteratorTypes> access_ iterators constant< (__is_random_ access_ iter<_IteratorT ypes> && ...)>; :is_base_ of<_IteratorTag , typename std::iterator_ traits< std::decay_ t<_IteratorType s>>::iterator_ category> ...>;
+ using __are_random_
+ = std::bool_
+#else
template <typename _IteratorTag, typename... _IteratorTypes>
using __are_iterators_of = std::conjunction<
std:
template <typename... _IteratorTypes> access_ iterators = __are_iterators _of<std: :random_ access_ iterator_ tag, _IteratorTypes...>;
using __are_random_
+#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.