Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure CTAD works for all thrust iterators #4142

Open
11 tasks
bernhardmgruber opened this issue Mar 14, 2025 · 0 comments
Open
11 tasks

Ensure CTAD works for all thrust iterators #4142

bernhardmgruber opened this issue Mar 14, 2025 · 0 comments

Comments

@bernhardmgruber
Copy link
Contributor

Constructor Template Argument Deduction (CTAD) allows the compiler to infer a class' template arguments from the invocation of its constructor. This feature was introduced in C++17. The workaround before where make_class functions.

Some thrust iterators already support CTAD. E.g. thrust::counting_iterator it{0} correctly deduces counting_iterator<int>. We should check and add tests that CTAD works for all iterators:

  • constant_iterator.h
  • counting_iterator.h
  • discard_iterator.h
  • offset_iterator.h
  • permutation_iterator.h
  • reverse_iterator.h
  • tabulate_output_iterator.h
  • transform_input_output_iterator.h
  • transform_iterator.h
  • transform_output_iterator.h
  • zip_iterator.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant