diff --git a/orbis-kernel/include/orbis/utils/Rc.hpp b/orbis-kernel/include/orbis/utils/Rc.hpp index f728b84..8992a37 100644 --- a/orbis-kernel/include/orbis/utils/Rc.hpp +++ b/orbis-kernel/include/orbis/utils/Rc.hpp @@ -124,6 +124,13 @@ public: bool operator==(std::nullptr_t) const { return m_ref == nullptr; } auto operator<=>(const T *other) const { return m_ref <=> other; } auto operator<=>(const Ref &other) const = default; + + template Ref cast() { + return Ref(dynamic_cast(m_ref)); + } + template Ref staticCast() { + return Ref(static_cast(m_ref)); + } }; // template