浏览代码

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.
kleines Filmröllchen 2 年之前
父节点
当前提交
5b4818df22
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      AK/Variant.h

+ 2 - 1
AK/Variant.h

@@ -225,8 +225,9 @@ IsLvalueReference<T>;
 template<NotLvalueReference... Ts>
 struct Variant
     : public Detail::MergeAndDeduplicatePacks<Detail::VariantConstructors<Ts, Variant<Ts...>>...> {
-private:
+public:
     using IndexType = Conditional<sizeof...(Ts) < 255, u8, size_t>; // Note: size+1 reserved for internal value checks
+private:
     static constexpr IndexType invalid_index = sizeof...(Ts);
 
     template<typename T>