summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Romain Geissler <romain.geissler@amadeus.com>2023-06-05 10:12:12 +0000
committerGravatar Romain Geissler <romain.geissler@amadeus.com>2023-06-06 14:18:42 +0000
commitc3b5a293aa684130320523b2dab63c8a2bb10fec (patch)
treed16f1d4077375d0e3d8f147c27761135c1280c36
parent77ba7ca9d2a523ef9f1837e53554fa65c232abc8 (diff)
Silence std::aligned_storage warnings in C++23 mode.
This is only a workaround, working only with gcc/clang, while waiting for a better long term fix not using std::aligned_storage, which is tracked by b/260219225.
-rw-r--r--absl/meta/type_traits.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/absl/meta/type_traits.h b/absl/meta/type_traits.h
index abaf96af..d5da93f3 100644
--- a/absl/meta/type_traits.h
+++ b/absl/meta/type_traits.h
@@ -40,6 +40,7 @@
#include <type_traits>
#include "absl/base/config.h"
+#include "absl/base/attributes.h"
// Defines the default alignment. `__STDCPP_DEFAULT_NEW_ALIGNMENT__` is a C++17
// feature.
@@ -278,6 +279,7 @@ using remove_extent_t = typename std::remove_extent<T>::type;
template <typename T>
using remove_all_extents_t = typename std::remove_all_extents<T>::type;
+ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
namespace type_traits_internal {
// This trick to retrieve a default alignment is necessary for our
// implementation of aligned_storage_t to be consistent with any
@@ -296,6 +298,7 @@ struct default_alignment_of_aligned_storage<
template <size_t Len, size_t Align = type_traits_internal::
default_alignment_of_aligned_storage<Len>::value>
using aligned_storage_t = typename std::aligned_storage<Len, Align>::type;
+ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
template <typename T>
using decay_t = typename std::decay<T>::type;