[BUG]: thrust::transform_iterator<F, ...> is broken if F is not copy_assignable #2393
Open
1 task done
Labels
bug
Something isn't working right.
Is this a duplicate?
Type of Bug
Silent Failure
Component
Thrust
Describe the bug
If the transformation function object of a
thrust::transform_iterator
is not copy_assignable (e.g., if it contains aconst
data member), thenthrust::transform_iterator
is still copyable, but it will just omit copying the contained transformation function. If the latter contains state, than this state is not copied and the transform iterator gives wrong results.How to Reproduce
Godbolt: https://godbolt.org/z/qbGxh31qE
Expected behavior
thrust::transform_iterator
's special member functions should fail to compile if the corresponding special member function is not supported on the wrapped user-provided function. If the latter is not copyable assignable, the transform iterator should also fail to compile if copy assignment is attempted.Reproduction link
No response
Operating System
No response
nvidia-smi output
No response
NVCC version
No response
The text was updated successfully, but these errors were encountered: