1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-05 22:34:49 +00:00

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

View File

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