warning: ISO C++ does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
test.cpp:13:21: note: in instantiation of function template specialization 'f<int>' requested here
int main() { return f<int>(); }
^
test.cpp:9:7: error: invalid operands to binary expression ('void' and 'int')
red += 5;
^ ~
warning: ISO C++ does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
error: cannot initialize return object of type 'int' with an lvalue of type 'void'
2 warnings and 2 errors generated.
Additional comments
If I just remove the templates it compiles and seems to work.
Describe the bug
If I use a reducer in a templated function the compiler gives me an error
Expected behavior
The reducer to work
OpenCilk version
clang version 14.0.6 (https://github.com/OpenCilk/opencilk-project fc90ded2b090672f84c58d12d8d85cd999eb6c1a) Target: x86_64-unknown-linux-gnu Thread model: posix
Steps to reproduce (include relevant output)
compile the following code
with
clang++ -fopencilk -o basic test.cpp
The error is
Additional comments
If I just remove the templates it compiles and seems to work.