diff --git a/Include/auROXTL/Objects/SOO.hpp b/Include/auROXTL/Objects/SOO.hpp index 69612d6..f5bf195 100644 --- a/Include/auROXTL/Objects/SOO.hpp +++ b/Include/auROXTL/Objects/SOO.hpp @@ -76,6 +76,17 @@ struct AU_ALIGN(sizeof(AuUInt)) Type ## SOO return (extends *)this->padding; \ } \ } \ + inline auto AsUnsafeSharedPointer() \ + { \ + if constexpr (std::is_const_v>) \ + { \ + return AuUnsafeRaiiToShared((const extends *)this->padding); \ + } \ + else \ + { \ + return AuUnsafeRaiiToShared((extends *)this->padding); \ + } \ + } \ inline operator extends&() \ { \ return *(extends *)this->padding; \ @@ -84,6 +95,10 @@ struct AU_ALIGN(sizeof(AuUInt)) Type ## SOO { \ return (extends *)this->padding; \ } \ + inline operator AuSPtr() \ + { \ + return AuUnsafeRaiiToShared((extends *)this->padding); \ + } \ inline operator const extends&() const \ { \ return *(const extends *)this->padding; \