Consider the following code:
constexpr __host__ void foo() { }
__global__ void baz()
{
if constexpr(1==2) { foo(); }
}
this fails to compile with CUDA 11.3.1's NVCC. However, if I remove the constexpr
- it does compile.
How come? Is this a bug?