Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions libcudacxx/include/cuda/std/__cccl/dialect.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@
# define _CCCL_HAS_IF_CONSTEVAL_IN_CXX20() 0
#endif

#if _CCCL_CUDA_COMPILER(NVCC) \
&& (_CCCL_CUDA_COMPILER(NVCC, <, 13) || _CCCL_DEVICE_COMPILATION() || _CCCL_COMPILER(CLANG))
// nvcc before 13 doesn't support if consteval at all. Since 13, it accepts if consteval in host code (clang doesn't
// work) and since 13.1 it works in device code, too.
#if _CCCL_CUDA_COMPILER(NVCC, <, 13) || (_CCCL_CUDA_COMPILER(NVCC, <, 13, 1) && _CCCL_DEVICE_COMPILATION()) \
|| (_CCCL_CUDA_COMPILER(NVCC) && _CCCL_COMPILER(CLANG))
# undef _CCCL_HAS_IF_CONSTEVAL_IN_CXX20
# define _CCCL_HAS_IF_CONSTEVAL_IN_CXX20() 0
#endif // ^^^ disable if consteval in c++20 for nvcc ^^^
Expand Down
Loading