par/stack: use our own aligned_storage_t alternative

aligned_storage_t is deprecated and will generate warnings. Use a very
similar construct within the stack itself instead.
This commit is contained in:
Danny Robson 2024-08-06 14:46:18 +10:00
parent a73db2a75c
commit 71d9a71b20

View File

@ -154,7 +154,10 @@ namespace cruft::parallel {
private: private:
using index_type = std::size_t; using index_type = std::size_t;
using raw_type = std::aligned_storage_t<sizeof(ValueT), alignof(ValueT)>;
struct raw_type {
alignas(ValueT) std::byte data[sizeof(ValueT)];
};
mutable cruft::thread::spinlock m_lock; mutable cruft::thread::spinlock m_lock;
std::atomic<index_type> m_cursor; std::atomic<index_type> m_cursor;