[FEA]: Improve compilation error message of cuda::std::apply with wrong arguments #2753
Open
1 task done
Labels
feature request
New feature or request.
Is this a duplicate?
Area
libcu++
Is your feature request related to a problem? Please describe.
Error message when
cuda::std::apply
gets a function that is not possible to be called with the supplied tuple is not helpful with finding out what went wrong. This is especially problematic with function templates because apply needs instantiated functions and it's easy to make a mistake.Consider the following example with a bug, where a function was meant to be called with a tuple of two integers: https://godbolt.org/z/76vbcsMWM
When std::apply/tuple is used, the error message is immediately clear:
I tried to call
void (int &&, int &&)
withconst int, const int
, so my template instantiation is wrong.With cuda::std::apply/tuple, the error message seems completely not related to the problem:
Describe the solution you'd like
It would be great to generate a more helpful error message in this case, one that references the function and argument types, not just the still packed tuple type and complaining about some deleted destructor.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: