T* &ptrref() { assert(!ptr); return ptr; }
T* operator->() const { assert(ptr); return ptr; }
operator T*() const { return this->ptr; }
T* &ptrref() { assert(!ptr); return ptr; }
T* operator->() const { assert(ptr); return ptr; }
operator T*() const { return this->ptr; }