Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
datapar algorithm instantiated with wrong type #2402
I'm trying to compile a simple datapar example with HPX and Vc. The lambda should be compiled in two versions: One with the Vc vector-type and one with the Vc scalar-type. But the error I get from my compiler indicates that it is also compiled with 'double &' as its type.
Compiler message, note the second line:
A lambda with no explicit return type does implicit return type deduction, and the rules governing implicit return type deduction are ... let's say suboptimal.
Don't close this issue just yet. It might be possible to do policy dispatch in two steps in such a way that code like this one is valid, or at least so that there's less superfluous lambda instantiation taking place.
For future reference: the problem is caused by the concept checking associated with the function
The concept checking code currently instantiates the provided function object (lambda) using the projected value_type of the used iterator which leads to the compilation problems noted above.
I see two possible solutions: