You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the transformation function object of a thrust::transform_iterator is not copy_assignable (e.g., if it contains a const data member), then thrust::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.
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:
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: