template struct mrpt::copiable_NULL_ptr¶
A wrapper class for pointers that, if copied with the “=” operator, should be set to nullptr in the new copy.
See also:
safe_ptr, non_copiable_ptr, copiable_NULL_ptr
#include <mrpt/core/safe_pointers.h> template <class T> struct copiable_NULL_ptr: public mrpt::copiable_NULL_ptr_basic { // construction copiable_NULL_ptr(); copiable_NULL_ptr(const copiable_NULL_ptr<T>& o); // methods copiable_NULL_ptr<T>& operator = (T* p); T& operator * (); const T& operator * () const; T& operator [] (size_t i); const T& operator [] (size_t i) const; };
Inherited Members¶
public: // methods copiable_NULL_ptr_basic<T>& operator = (T* p); copiable_NULL_ptr_basic<T>& operator = (const copiable_NULL_ptr_basic<T>&); bool operator == (const T* o) const; bool operator == (const copiable_NULL_ptr_basic<T>& o) const; bool operator != (const T* o) const; bool operator != (const copiable_NULL_ptr_basic<T>& o) const; T*& get(); const T*& get() const; T*& operator -> (); const T*& operator -> () const;