mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue