Open rgreenblatt opened 5 years ago
This occurs because in this section, the number of arguments only go up to three. I will make a pr to address this.
Can you try enabling C++11 for Boost.Compute by defining BOOST_COMPUTE_USE_CPP11
? This should enable the variadic template version from line 221. If you need C++03 version you can create PR to add versions with more arguments, or do in your code.
I was incorrect about the code causing this issue. The actual issue is in this section: https://github.com/boostorg/compute/blob/master/include/boost/compute/functional/bind.hpp#L145. The issue isn't resolved by enabling c++11 because there is no variadic template version of apply_invoked_bound_function. I don't know how to use variadic templates to generalize apply_invoked_bound_function, but I would be happy to make a pr to add additional versions of the function up to some larger number of arguments.
For instance adding the following to test/test_functional_bind.cpp causes a compiler error:
The full error and build log can be found here: https://pastebin.com/MnHi2WZs. I am using ubuntu 18.04 with libboost1.65-dev and g++ 7.4. This reproduces for a variety of different argument types etc.
As far as I know, the best work around is to adapt a struct which contains to arguments.