BAN: Variant now aligns its data properly
This commit is contained in:
parent
cafd546ce8
commit
c35e7368f2
|
@ -45,7 +45,7 @@ namespace BAN
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr uint32_t m_size = Math::max(sizeof(T1), sizeof(T2));
|
static constexpr uint32_t m_size = Math::max(sizeof(T1), sizeof(T2));
|
||||||
uint8_t m_storage[m_size] = {};
|
alignas(Math::max(alignof(T1), alignof(T2))) uint8_t m_storage[m_size] = {};
|
||||||
uint32_t m_index = 0;
|
uint32_t m_index = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue