diff --git a/types/tagged.hpp b/types/tagged.hpp index 44971c31..c106de4d 100644 --- a/types/tagged.hpp +++ b/types/tagged.hpp @@ -41,8 +41,6 @@ namespace cruft { using first_t = cruft::tuple::type::nth_t; using tag_t = std::decay_t; - static constexpr auto alignment = max (alignof (ValueT)...); - /// All child types should have identical tag types static_assert ((std::is_same_v> && ...)); @@ -121,7 +119,7 @@ namespace cruft { tag_t m_tag; /// The storage area for all desired types. - alignas (alignment) std::byte m_data[ + alignas (alignof (ValueT)...) std::byte m_data[ cruft::max (sizeof (ValueT)...) ]; };