40 #ifndef GEOGRAM_BASIC_SMART_POINTER
41 #define GEOGRAM_BASIC_SMART_POINTER
125 if(ptr != pointer_) {
141 T* rhs_p = rhs.
get();
142 if(rhs_p != pointer_) {
190 operator T* ()
const {
207 return pointer_ ==
nullptr;
222 template <
class T1,
class T2>
224 return lhs.
get() == rhs.
get();
235 template <
class T1,
class T2>
237 return lhs.
get() != rhs.
get();
248 template <
class T1,
class T2>
250 return lhs.
get() < rhs.
get();
261 template <
class T1,
class T2>
263 return lhs.
get() <= rhs.
get();
274 template <
class T1,
class T2>
276 return lhs.
get() > rhs.
get();
287 template <
class T1,
class T2>
289 return lhs.
get() >= rhs.
get();
Assertion checking mechanism.
#define geo_assert(x)
Verifies that a condition is met.
A smart pointer with reference-counted copy semantics.
void reset()
Resets pointer.
bool is_null() const
Check if stored pointer is null.
SmartPointer()
Creates an empty smart pointer.
~SmartPointer()
Deletes a smart pointer.
SmartPointer< T > & operator=(T *ptr)
Assignment from a pointer.
T & operator*() const
Dereferences object.
T * get() const
Get pointer.
SmartPointer(const SmartPointer< T > &rhs)
Create a copy of a smart pointer.
SmartPointer(T *ptr)
Creates a smart pointer that owns a pointer.
T * operator->() const
Dereferences object member.
Common include file, providing basic definitions. Should be included before anything else by all head...
Types and functions for memory manipulation.
bool operator!=(const aligned_allocator< T1, A1 > &, const aligned_allocator< T2, A2 > &)
Tests whether two aligned_allocators are different.
bool operator==(const aligned_allocator< T1, A1 > &, const aligned_allocator< T2, A2 > &)
Tests whether two aligned_allocators are equal.
Global Vorpaline namespace.