https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90509
Bug ID: 90509 Summary: failing typing std::transform with policies on std::insert_iterator Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: maurizio.drocco at pnnl dot gov Target Milestone: --- Created attachment 46367 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46367&action=edit source code The attached code fails to compile due to a typing issue: gcc/9.1.0/include/c++/9.1.0/pstl/glue_algorithm_impl.h:328:9: error: invalid parameter type '_OutputType' {aka 'void'} It looks like the transform with policy relies on the iterator traits to extract a 'reference' type, that is not defined for insert iterators. *** how to replicate: - without execution policies: (working) g++-9 -Wall -Wextra -std=c++17 -O3 -o transform transform.cc - with execution policies: (failing) g++-9 -Wall -Wextra -std=c++17 -O3 -DPOLICY -o transform transform.cc *** GCC version: g++-9 -v Using built-in specs. COLLECT_GCC=g++-9 COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.1.0/libexec/gcc/x86_64-apple-darwin18/9.1.0/lto-wrapper Target: x86_64-apple-darwin18 Configured with: ../configure --build=x86_64-apple-darwin18 --prefix=/usr/local/Cellar/gcc/9.1.0 --libdir=/usr/local/Cellar/gcc/9.1.0/lib/gcc/9 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 9.1.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk Thread model: posix gcc version 9.1.0 (Homebrew GCC 9.1.0)