Starting with CUDA 12.4, nvcc can't deduce a template type in template function under weird conditions

I suggest filing a bug.