mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +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
Notes:
sideshowbarker
2024-07-17 03:27:40 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/12e4cd3b77 Pull-request: https://github.com/SerenityOS/serenity/pull/16396 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/awesomekling ✅
1 changed files with 2 additions and 0 deletions
|
@ -463,6 +463,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
auto index() const { return m_index; }
|
||||
|
||||
private:
|
||||
template<typename... NewTs>
|
||||
Variant<NewTs...> downcast_variant(TypeWrapper<Variant<NewTs...>>) &&
|
||||
|
|
Loading…
Reference in a new issue