summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NeKit/Variant.inl
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/NeKit/Variant.inl')
-rw-r--r--src/kernel/NeKit/Variant.inl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kernel/NeKit/Variant.inl b/src/kernel/NeKit/Variant.inl
new file mode 100644
index 00000000..bad41d72
--- /dev/null
+++ b/src/kernel/NeKit/Variant.inl
@@ -0,0 +1,13 @@
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (see LICENSE file)
+// Official repository: https://github.com/nekernel-org/nekernel
+
+#ifndef NEKIT_VARIANT_INL
+#define NEKIT_VARIANT_INL
+
+template <typename T>
+inline T* Kernel::Variant::As() {
+ return reinterpret_cast<T*>(fPtr);
+}
+
+#endif