diff options
author | Derek Mauro <dmauro@google.com> | 2023-06-20 12:58:41 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-06-20 12:59:43 -0700 |
commit | aaf4842c10ee26a8aa20a93d7f834a5c362ab1f2 (patch) | |
tree | ffc5d0646fca3a45ad02c48def57a63d568128fc /absl/meta | |
parent | 4ba63810304974e121d32df0fe41b23640a691b2 (diff) |
Avoid trying to use __is_trivially_relocatable with NVCC
Fixes #1479
PiperOrigin-RevId: 542022998
Change-Id: I9d6059341fe867ad5539ef2a4d57925858a9cfc0
Diffstat (limited to 'absl/meta')
-rw-r--r-- | absl/meta/type_traits.h | 8 |
1 files 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 <class T> struct is_trivially_relocatable : std::integral_constant<bool, __is_trivially_relocatable(T)> {}; |