From 6f5238da6efd054f251fb77b044357395535e2c8 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Wed, 8 Jan 2025 15:05:18 +0100 Subject: [PATCH 1/2] Enable thrust::identity test for non-MSVC This seems to be an oversight when the test was added --- thrust/testing/functional.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thrust/testing/functional.cu b/thrust/testing/functional.cu index 7757ed47bed..6cea48656d1 100644 --- a/thrust/testing/functional.cu +++ b/thrust/testing/functional.cu @@ -212,7 +212,7 @@ THRUST_DISABLE_BROKEN_GCC_VECTORIZER void TestIdentityFunctional() // value categories when casting to different type static_assert(::cuda::std::is_same{}(3.14)), int&&>::value, ""); // unfortunately, old versions of MSVC pick the `const int&` overload instead of `int&&` -#if _CCCL_COMPILER(MSVC, >=, 19, 29) +#if !_CCCL_COMPILER(MSVC) || _CCCL_COMPILER(MSVC, >=, 19, 29) static_assert(::cuda::std::is_same{}(d)), int&&>::value, ""); static_assert(::cuda::std::is_same{}(as_const(d))), int&&>::value, ""); #endif From 83dac354efa980232e01d77cd1ccf32d3e3f29ed Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Wed, 8 Jan 2025 15:34:45 +0100 Subject: [PATCH 2/2] Update thrust/testing/functional.cu Co-authored-by: Michael Schellenberger Costa --- thrust/testing/functional.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thrust/testing/functional.cu b/thrust/testing/functional.cu index 6cea48656d1..750a0f76ace 100644 --- a/thrust/testing/functional.cu +++ b/thrust/testing/functional.cu @@ -212,7 +212,7 @@ THRUST_DISABLE_BROKEN_GCC_VECTORIZER void TestIdentityFunctional() // value categories when casting to different type static_assert(::cuda::std::is_same{}(3.14)), int&&>::value, ""); // unfortunately, old versions of MSVC pick the `const int&` overload instead of `int&&` -#if !_CCCL_COMPILER(MSVC) || _CCCL_COMPILER(MSVC, >=, 19, 29) +#if !_CCCL_COMPILER(MSVC, <, 19, 29) static_assert(::cuda::std::is_same{}(d)), int&&>::value, ""); static_assert(::cuda::std::is_same{}(as_const(d))), int&&>::value, ""); #endif