geomc 1.0
A c++ linear algebra template library
|
Array storage with templated static or dynamic size, and template-selectable ownership policy. More...
#include <geomc/Storage.h>
Public Types | |
typedef Storage< T, N > | type |
Storage class inherited from. | |
Array storage with templated static or dynamic size, and template-selectable ownership policy.
T | Element type. |
N | Size of the array, or 0 for dynamic size. |
The ownership policy behavior is as follows:
STORAGE_SHARED
, then dynamically-sized arrays will allocate their own reference-counted memory, and the underlying storage will be deleted when the last owner is destroyed. STORAGE_UNIQUE
, then dynamically-sized arrays will allocate their own memory, and the underlying arrays will be duplicated on copy or assignment. STORAGE_WRAPPED
, then the array will simply wrap a pointer to caller-managed memory, which must be valid for the lifetime of this object, and must contain the minimum number of elements. Duplicates will refer to the same backing memory. No attempt will be made to free the pointer upon destruction. #include <geomc/Storage.h>