mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-06 16:09:30 +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:
parent
543890c5c9
commit
12e4cd3b77
|
@ -463,6 +463,8 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto index() const { return m_index; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename... NewTs>
|
template<typename... NewTs>
|
||||||
Variant<NewTs...> downcast_variant(TypeWrapper<Variant<NewTs...>>) &&
|
Variant<NewTs...> downcast_variant(TypeWrapper<Variant<NewTs...>>) &&
|
||||||
|
|
Loading…
Reference in a new issue