diff --git a/src/tawashi_implem/safe_stack_object.hpp b/src/tawashi_implem/safe_stack_object.hpp index 0806d2e..1738501 100644 --- a/src/tawashi_implem/safe_stack_object.hpp +++ b/src/tawashi_implem/safe_stack_object.hpp @@ -38,6 +38,8 @@ namespace curry { SafeStackObject& operator= (const SafeStackObject& parOther) = delete; operator Kakoune::SafePtr&(); + template + operator Kakoune::SafePtr(); T& operator*(); safe_ptr& operator->(); @@ -84,6 +86,12 @@ namespace curry { return m_obj_ptr; } + template + template + SafeStackObject::operator Kakoune::SafePtr() { + return Kakoune::SafePtr(&m_obj); + } + template T& SafeStackObject::operator*() { return *m_obj_ptr;