Commit aaf4842c by Derek Mauro Committed by Copybara-Service

Avoid trying to use __is_trivially_relocatable with NVCC

Fixes #1479

PiperOrigin-RevId: 542022998
Change-Id: I9d6059341fe867ad5539ef2a4d57925858a9cfc0
parent 4ba63810
...@@ -500,8 +500,12 @@ using swap_internal::StdSwapIsUnconstrained; ...@@ -500,8 +500,12 @@ using swap_internal::StdSwapIsUnconstrained;
// there. // there.
// //
// TODO(b/275003464): remove the opt-out once the bug is fixed. // TODO(b/275003464): remove the opt-out once the bug is fixed.
//
// According to https://github.com/abseil/abseil-cpp/issues/1479, this does not
// work with NVCC either.
#if ABSL_HAVE_BUILTIN(__is_trivially_relocatable) && \ #if ABSL_HAVE_BUILTIN(__is_trivially_relocatable) && \
!(defined(__clang__) && (defined(_WIN32) || defined(_WIN64))) !(defined(__clang__) && (defined(_WIN32) || defined(_WIN64))) && \
!defined(__NVCC__)
template <class T> template <class T>
struct is_trivially_relocatable struct is_trivially_relocatable
: std::integral_constant<bool, __is_trivially_relocatable(T)> {}; : std::integral_constant<bool, __is_trivially_relocatable(T)> {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment