AK: Allow the user to access the variant index

The average user has no need for this, but the Jakt compiler uses this
to avoid going through the expensive ::visit() and ::get<>() APIs.
This commit is contained in:
Ali Mohammad Pur 2022-12-09 20:16:08 +03:30 committed by Ali Mohammad Pur
parent 543890c5c9
commit 12e4cd3b77
Notes: sideshowbarker 2024-07-17 03:27:40 +09:00

View file

@ -463,6 +463,8 @@ public:
}
}
auto index() const { return m_index; }
private:
template<typename... NewTs>
Variant<NewTs...> downcast_variant(TypeWrapper<Variant<NewTs...>>) &&