From aaf4842c10ee26a8aa20a93d7f834a5c362ab1f2 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Tue, 20 Jun 2023 12:58:41 -0700 Subject: Avoid trying to use __is_trivially_relocatable with NVCC Fixes #1479 PiperOrigin-RevId: 542022998 Change-Id: I9d6059341fe867ad5539ef2a4d57925858a9cfc0 --- absl/meta/type_traits.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/absl/meta/type_traits.h b/absl/meta/type_traits.h index 4f9ea017..cf71164b 100644 --- a/absl/meta/type_traits.h +++ b/absl/meta/type_traits.h @@ -500,8 +500,12 @@ using swap_internal::StdSwapIsUnconstrained; // there. // // TODO(b/275003464): remove the opt-out once the bug is fixed. -#if ABSL_HAVE_BUILTIN(__is_trivially_relocatable) && \ - !(defined(__clang__) && (defined(_WIN32) || defined(_WIN64))) +// +// According to https://github.com/abseil/abseil-cpp/issues/1479, this does not +// work with NVCC either. +#if ABSL_HAVE_BUILTIN(__is_trivially_relocatable) && \ + !(defined(__clang__) && (defined(_WIN32) || defined(_WIN64))) && \ + !defined(__NVCC__) template struct is_trivially_relocatable : std::integral_constant {}; -- cgit v1.2.3