[BUG]: Compiler fails to generate default copy assignment operator for thrust::transform_iterator #3541
Closed
1 task done
Labels
bug
Something isn't working right.
Is this a duplicate?
Type of Bug
Compile-time Error
Component
Thrust
Describe the bug
The NVC++ stdpar fails to generate a default copy assignment operator for
thrust::transform_iterator
if the function object it contains is not copyable. For example, for this test case:The nvc++ stdpar fails with
cannot be referenced -- it is a deleted function
:This issue arises because lambdas in C++17 have a deleted copy assignment operator, causing the
thrust::transform_iterator
to become non-copy assignable.From https://timsong-cpp.github.io/cppwp/n4659/expr.prim.lambda#closure-11:
The closure type associated with a lambda-expression has no default constructor and a deleted copy assignment operator.
This test has started failing after this CCCL commit that replaces the custom copy assignment operator for
thrust::transform_iterator
with= default
:8da3ace
How to Reproduce
To compile the test with:
Expected behavior
The NVC++ stdpar fails with:
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: