summaryrefslogtreecommitdiff
path: root/absl/base/config.h
diff options
context:
space:
mode:
authorGravatar Keith Smiley <keithbsmiley@gmail.com>2022-10-04 17:22:04 +0000
committerGravatar Keith Smiley <keithbsmiley@gmail.com>2022-10-04 17:23:42 +0000
commite61fc6d8da5154c6a665d7a28b9978f11b78eb62 (patch)
treed1f55a469570b9c7753e9558a54f7cba1fed1071 /absl/base/config.h
parente225d0b2c658e3bdd9295e4392ffb2d0767d9476 (diff)
Fix more clang deprecated builtins
If you compile with clang 15+, the uses of trivially destructible and assignable are deprecated. This sets this configuration correctly as the ifdef to fix the build. Fixes https://github.com/abseil/abseil-cpp/issues/1201 Related https://github.com/abseil/abseil-cpp/pull/1277
Diffstat (limited to 'absl/base/config.h')
-rw-r--r--absl/base/config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index 95131068..35911698 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -243,6 +243,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE
#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
@@ -264,6 +265,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#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) && \