pybind11/include
Alexander Grund 3414c56b6c
Workaround NVCC parse failure in cast_op (#4893)
* Workaround NVCC parse failure in `cast_op`

There is a bug in some CUDA versions (observed in CUDA 12.1 and 11.7 w/ GCC 12.2),
that makes `cast_op` fail to compile:
  `cast.h:45:120: error: expected template-name before ‘<’ token`

Defining the nested type as an alias and using it allows this to work
without any change in semantics.

Fixes #4606

* style: pre-commit fixes

* Add comments to result_t referencing PR

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-21 10:50:14 -07:00
..
pybind11 Workaround NVCC parse failure in cast_op (#4893) 2023-10-21 10:50:14 -07:00