Commit 7b461233 by Derek Mauro Committed by Copybara-Service

Remove backfills of some type traits that are now fully supported

PiperOrigin-RevId: 512622121
Change-Id: If90aaf7939062bd475253c372d9d7950c98c7150
parent f2b52372
...@@ -237,15 +237,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || ...@@ -237,15 +237,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
// ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE // ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE
// //
// Checks whether `std::is_trivially_destructible<T>` is supported. // Checks whether `std::is_trivially_destructible<T>` is supported.
//
// Notes: All supported compilers using libc++ support this feature, as does
// gcc >= 4.8.1 using libstdc++, and Visual Studio.
#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE #ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE
#error ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE cannot be directly set #error ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE cannot be directly set
#elif defined(_LIBCPP_VERSION) || defined(_MSC_VER) || \
(defined(__clang__) && __clang_major__ >= 15) || \
(!defined(__clang__) && defined(__GLIBCXX__) && \
ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(4, 8))
#define ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE 1 #define ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE 1
#endif #endif
...@@ -253,36 +246,26 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || ...@@ -253,36 +246,26 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
// //
// Checks whether `std::is_trivially_default_constructible<T>` and // Checks whether `std::is_trivially_default_constructible<T>` and
// `std::is_trivially_copy_constructible<T>` are supported. // `std::is_trivially_copy_constructible<T>` are supported.
#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE
#error ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE cannot be directly set
#else
#define ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE 1
#endif
// ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE // ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE
// //
// Checks whether `std::is_trivially_copy_assignable<T>` is supported. // Checks whether `std::is_trivially_copy_assignable<T>` is supported.
#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE
// Notes: Clang with libc++ supports these features, as does gcc >= 7.4 with #error ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE cannot be directly set
// libstdc++, or gcc >= 8.2 with libc++, and Visual Studio (but not NVCC). #else
#if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE)
#error ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE cannot be directly set
#elif defined(ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE)
#error ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE cannot directly set
#elif (defined(__clang__) && defined(_LIBCPP_VERSION)) || \
(defined(__clang__) && __clang_major__ >= 15) || \
(!defined(__clang__) && \
((ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(7, 4) && defined(__GLIBCXX__)) || \
(ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(8, 2) && \
defined(_LIBCPP_VERSION)))) || \
(defined(_MSC_VER) && !defined(__NVCC__) && !defined(__clang__))
#define ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE 1
#define ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1 #define ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1
#endif #endif
// ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE // ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE
// //
// Checks whether `std::is_trivially_copyable<T>` is supported. // Checks whether `std::is_trivially_copyable<T>` is supported.
// #ifdef ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE
// Notes: Clang 15+ with libc++ supports these features, GCC hasn't been tested.
#if defined(ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE)
#error ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE cannot be directly set #error ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE cannot be directly set
#elif defined(__clang__) && (__clang_major__ >= 15)
#define ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE 1 #define ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE 1
#endif #endif
......
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