From c35e7368f2bf5f0ba6ce20fdb57c3464f013936c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 12 Apr 2023 00:17:45 +0300 Subject: [PATCH] BAN: Variant now aligns its data properly --- BAN/include/BAN/Variant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BAN/include/BAN/Variant.h b/BAN/include/BAN/Variant.h index cf6d4d2004..b770126225 100644 --- a/BAN/include/BAN/Variant.h +++ b/BAN/include/BAN/Variant.h @@ -45,7 +45,7 @@ namespace BAN private: 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; };