diff --git a/AK/Variant.h b/AK/Variant.h index c3db1563ac3..478f6a12b91 100644 --- a/AK/Variant.h +++ b/AK/Variant.h @@ -191,7 +191,7 @@ struct InheritFromUniqueEntries; // as that has already been checked before. // This makes sure that the search is linear in time (like the 'merge' step of merge sort). template -struct InheritFromUniqueEntries, IndexSequence, Qs...> +struct AK_COMPACT_EMPTY_BASES InheritFromUniqueEntries, IndexSequence, Qs...> : public BlankIfDuplicate, Qs>...>... { using BlankIfDuplicate, Qs>...>::BlankIfDuplicate...; @@ -203,7 +203,7 @@ struct InheritFromPacks; // InheritFromPacks will attempt to 'merge' the pack 'Ps' with *itself*, but skip the duplicate entries // (via InheritFromUniqueEntries). template -struct InheritFromPacks, Ps...> +struct AK_COMPACT_EMPTY_BASES InheritFromPacks, Ps...> : public InheritFromUniqueEntries, Ps...>... { using InheritFromUniqueEntries, Ps...>::InheritFromUniqueEntries...; @@ -225,7 +225,7 @@ template concept NotLvalueReference = !IsLvalueReference; template -struct Variant +struct AK_COMPACT_EMPTY_BASES Variant : public Detail::MergeAndDeduplicatePacks>...> { public: using IndexType = Conditional<(sizeof...(Ts) < 255), u8, size_t>; // Note: size+1 reserved for internal value checks