The members of __internal::__policy_traits aren't using reserved names: template <> struct __policy_traits<sequenced_policy> { typedef std::false_type allow_parallel; typedef std::false_type allow_unsequenced; typedef std::false_type allow_vector; }; This means the alias templates following it are broken: template <typename _ExecutionPolicy> using __collector_t = typename __internal::__policy_traits<typename std::decay<_ExecutionPolicy>::type>::__collector_type; This is invalid, because __collector_type doesn't exist, the member is really called collector_type (although it shouldn't be). And later in that file: template <typename policy, typename... _IteratorTypes> struct __prefer_unsequenced_tag and template <typename policy, typename... _IteratorTypes> struct __prefer_parallel_tag These use "policy" which is not a reserved name either.
(In reply to Jonathan Wakely from comment #0) > template <typename _ExecutionPolicy> > using __collector_t = > typename __internal::__policy_traits<typename > std::decay<_ExecutionPolicy>::type>::__collector_type; N.B. collector_t alias appears to be completely unused, and no specialization of __policy_traits defines __collector_type. So ignore that one, but the same problem exists for: template <typename _ExecutionPolicy> using __allow_vector = typename __internal::__policy_traits<typename std::decay<_ExecutionPolicy>::type>::__allow_vector; template <typename _ExecutionPolicy> using __allow_unsequenced = typename __internal::__policy_traits<typename std::decay<_ExecutionPolicy>::type>::__allow_unsequenced; template <typename _ExecutionPolicy> using __allow_parallel = typename __internal::__policy_traits<typename std::decay<_ExecutionPolicy>::type>::__allow_parallel; These also aren't used, and refer to non-existent members, but they *could* be used (if they were fixed), see Bug 47602.
Up for review in https://reviews.llvm.org/D97808
commit 053146a690774f8955893fbb995ae176eb2e00a7 Author: Louis Dionne <ldionne.2@gmail.com> Date: Tue Mar 2 16:53:07 2021 -0500 [pstl] Fix broken policy_traits and clean up unused code https://llvm.org/PR47602 https://llvm.org/PR47601 Differential Revision: https://reviews.llvm.org/D97808