std::aligned_storage_t was deprecated in C++23, to be prepared for
it, let's use alignas for the same behavior.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
public:
// In the future we might want to have a slab allocator here with few
// embedded slots. This would allow to avoid the "if" in dtor of ptr_node.
- std::aligned_storage<sizeof(ptr_node),
- alignof(ptr_node)>::type bptr_storage;
+ struct alignas(ptr_node) {
+ unsigned char data[sizeof(ptr_node)];
+ } bptr_storage;
protected:
char *data;
unsigned len;