Skip to content

Commit

Permalink
Attempt working around nvcc+MSVC issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Jan 8, 2025
1 parent 0637842 commit 98d7089
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thrust/testing/functional.cu
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ THRUST_DISABLE_BROKEN_GCC_VECTORIZER void TestIdentityFunctional()

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

0 comments on commit 98d7089

Please sign in to comment.