From 5b4818df22769bc3353c33b1f1a8d299d96e6efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Wed, 9 Nov 2022 16:57:26 +0100 Subject: [PATCH] AK: Make Variant's index type public This will allow the IPC system to use the exact required index type, saving transmission space, once it can send variants. --- AK/Variant.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AK/Variant.h b/AK/Variant.h index 6290c483de..ee423927a0 100644 --- a/AK/Variant.h +++ b/AK/Variant.h @@ -225,8 +225,9 @@ IsLvalueReference; template struct Variant : public Detail::MergeAndDeduplicatePacks>...> { -private: +public: using IndexType = Conditional; // Note: size+1 reserved for internal value checks +private: static constexpr IndexType invalid_index = sizeof...(Ts); template