Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/uninitialised-storage.hpp"
Managed uninitialised Heap-allocated storage with array like access.
T | the nominal type assumed to sit in each »slot« |
Definition at line 136 of file uninitialised-storage.hpp.
Public Member Functions | |
UninitialisedDynBlock (size_t cnt) | |
UninitialisedDynBlock (UninitialisedDynBlock &&rr) | |
UninitialisedDynBlock (UninitialisedDynBlock const &)=delete | |
T * | after () |
T const * | after () const |
T * | allocate (size_t cnt) |
_Arr & | array () |
_Arr const & | array () const |
T * | back () |
T const * | back () const |
template<typename... Args> | |
T & | createAt (size_t idx, Args &&...args) |
void | destroyAt (size_t idx) |
void | discard () |
T * | front () |
T const * | front () const |
operator bool () const | |
UninitialisedDynBlock & | operator= (UninitialisedDynBlock &&)=delete |
UninitialisedDynBlock & | operator= (UninitialisedDynBlock const &)=delete |
T & | operator[] (size_t idx) |
T const & | operator[] (size_t idx) const |
size_t | size () const |
Friends | |
void | swap (UninitialisedDynBlock &u1, UninitialisedDynBlock &u2) |
Private Types | |
using | _Arr = T[] |
Private Attributes | |
void * | buff_ {nullptr} |
size_t | size_ {0} |