function2 icon indicating copy to clipboard operation
function2 copied to clipboard

std::aligned_storage_t is deprecated in C++23

Open olekolek1000 opened this issue 9 months ago • 0 comments

cppreference: https://en.cppreference.com/w/cpp/types/aligned_storage

It's being used here:

/// A union which makes the pointer to the heap object share the
/// same space with the internal capacity.
/// The storage type is distinguished by multiple versions of the
/// control and vtable.
template <typename Capacity, typename = void>
struct internal_capacity {
	/// We extend the union through a technique similar to the tail object hack
	typedef union {
		/// Tag to access the structure in a type-safe way
		data_accessor accessor_;
		/// The internal capacity we use to allocate in-place
		std::aligned_storage_t<Capacity::capacity, Capacity::alignment> capacity_;
	} type;
};

olekolek1000 avatar May 14 '25 08:05 olekolek1000