Skip to content

Commit 8840f57

Browse files
Attempt working around nvcc+MSVC issue
1 parent f2d78c7 commit 8840f57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

thrust/testing/functional.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ THRUST_DISABLE_BROKEN_GCC_VECTORIZER void TestIdentityFunctional()
211211

212212
// value categories when casting to different type
213213
static_assert(::cuda::std::is_same<decltype(thrust::identity<int>{}(3.14)), int&&>::value, "");
214-
// unfortunately, old versions of MSVC pick the `const int&` overload instead of `int&&`
215-
#if !_CCCL_COMPILER(MSVC, <, 19, 29)
214+
// unfortunately, old versions of MSVC or nvcc in MSVC mode pick the `const int&` overload instead of `int&&`
215+
#if !_CCCL_COMPILER(MSVC, <, 19, 29) && !(_CCCL_COMPILER(MSVC) && _CCCL_CUDA_COMPILER(NVCC, <, 12, 1))
216216
static_assert(::cuda::std::is_same<decltype(thrust::identity<int>{}(d)), int&&>::value, "");
217217
static_assert(::cuda::std::is_same<decltype(thrust::identity<int>{}(as_const(d))), int&&>::value, "");
218218
#endif

0 commit comments

Comments
 (0)