list/node: remove use of deprecated aligned_storage_t
This commit is contained in:
parent
537e5d40a8
commit
7a37d9b404
@ -8,6 +8,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cruft/util/cast.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
@ -88,7 +90,7 @@ namespace cruft::list::node {
|
||||
struct disjoint {
|
||||
using value_type = ValueT;
|
||||
|
||||
std::aligned_storage_t<sizeof (ValueT), alignof (ValueT)> bytes;
|
||||
alignas(ValueT) std::byte bytes[sizeof(ValueT)];
|
||||
};
|
||||
|
||||
|
||||
@ -171,7 +173,7 @@ namespace cruft::list::node {
|
||||
"Alignment must be equal to allow pointer indexing"
|
||||
);
|
||||
|
||||
return *reinterpret_cast<ValueT*> (&obj->bytes);
|
||||
return *cast::alignment<ValueT*> (&obj->bytes);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user