Skip to content

Commit

Permalink
Fix open-telemetry#3111: Remove aligned_storage from nostd
Browse files Browse the repository at this point in the history
std::aligned_storage was deprecated in C++23.
Abseil removed its aligned_storage in abseil/abseil-cpp@4213346
  • Loading branch information
juko committed Oct 25, 2024
1 parent 9947619 commit f31dee8
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,6 @@ struct VoidTImpl {
using type = void;
};

// This trick to retrieve a default alignment is necessary for our
// implementation of aligned_storage_t to be consistent with any implementation
// of std::aligned_storage.
template <size_t Len, typename T = std::aligned_storage<Len>>
struct default_alignment_of_aligned_storage;

template <size_t Len, size_t Align>
struct default_alignment_of_aligned_storage<Len,
std::aligned_storage<Len, Align>> {
static constexpr size_t value = Align;
};

////////////////////////////////
// Library Fundamentals V2 TS //
////////////////////////////////
Expand Down Expand Up @@ -619,10 +607,6 @@ 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;

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;

template <typename T>
using decay_t = typename std::decay<T>::type;

Expand Down

0 comments on commit f31dee8

Please sign in to comment.