diff --git a/include/xo/alloc/Object.hpp b/include/xo/alloc/Object.hpp index 5a981998..81f0611c 100644 --- a/include/xo/alloc/Object.hpp +++ b/include/xo/alloc/Object.hpp @@ -61,7 +61,9 @@ namespace xo { void assign_ptr(T * x) { ptr_ = x; } gc_ptr & operator=(const gc_ptr & x) { ptr_ = x.ptr(); return *this; } + T * operator->() const { return ptr_; } + T & operator*() const { return *ptr_; } private: T * ptr_ = nullptr;