https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117005
Bug ID: 117005 Summary: Parallel Mode algorithms need to qualify all calls Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- libstdc++-v3/includeparallel/algo.h is full of unqualified calls like: template<typename _IIter, typename _Tp> inline typename iterator_traits<_IIter>::difference_type count(_IIter __begin, _IIter __end, const _Tp& __value) { return __count_switch(__begin, __end, __value, std::__iterator_category(__begin)); } This performs ADL for __count_switch, which can cause the compiler to attempt to complete incomplete classes to find associated namespaces (and it's just slower to do ADL than qualified lookups). Everything should be qualified except calls to std::swap (which were removed by g:fc722a0ea442f0 anyway). This causes at least one testsuite failure, but should fail elsewhere too if we tested the other algos similarly: FAIL: 24_iterators/indirect_callable/projected-adl.cc -std=gnu++20 (test for excess errors) Excess errors: /home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/24_iterators/indirect_callable/projected-adl.cc:23: error: 'Holder<T>::t' has incomplete type