1.10 |
Copy-On-Write wrapper for an object or container. More...
#include <cow.h>
Public Member Functions | |
CopyOnWriteAllocate ()=default | |
CopyOnWriteAllocate (const std::shared_ptr< T > &refptr) | |
Construct with a shared_ptr to the object. | |
CopyOnWriteAllocate (T *t) | |
Construct with a pointer to the object. This now owns the pointer. | |
operator bool () const | |
Bool operator. | |
T & | operator* () |
Dereference operator. | |
const T & | operator* () const |
Dereference operator. This will allocate. | |
T * | operator-> () |
Arrow operator. | |
const T * | operator-> () const |
Arrow operator. | |
Copy-On-Write wrapper for an object or container.
This creates copy on write semantics for an object. This also performs lazy initialization of the object and will automatically default construct it when needed.
|
default |
|
inlineexplicit |
Construct with a pointer to the object. This now owns the pointer.
|
inlineexplicit |
Construct with a shared_ptr to the object.
|
inlineexplicit |
Bool operator.
|
inline |
Dereference operator.
|
inline |
Dereference operator. This will allocate.
|
inline |
Arrow operator.
|
inline |
Arrow operator.