diff --git a/libcudacxx/include/cuda/std/__type_traits/type_list.h b/libcudacxx/include/cuda/std/__type_traits/type_list.h index 0be25bf6a3e..96357ff2674 100644 --- a/libcudacxx/include/cuda/std/__type_traits/type_list.h +++ b/libcudacxx/include/cuda/std/__type_traits/type_list.h @@ -258,7 +258,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT __type_defer {}; // Implementation for indexing into a list of types: -# if defined(__cpp_pack_indexing) +# if defined(__cpp_pack_indexing) && !defined(_CCCL_CUDA_COMPILER_NVCC) + +_CCCL_DIAG_PUSH +_CCCL_DIAG_SUPPRESS_CLANG("-Wc++26-extensions") template using __type_index_c = _Ts...[_Ip]; @@ -266,6 +269,8 @@ using __type_index_c = _Ts...[_Ip]; template using __type_index = _Ts...[_Ip::value]; +_CCCL_DIAG_POP + // Versions of nvcc prior to 12.0 have trouble with pack expansion into // __type_pack_element in an alias template, so we use the fall-back // implementation instead.