Lumiera  0.pre.03
»edit your freedom«
UninitialisedDynBlock< T > Class Template Reference

#include "lib/uninitialised-storage.hpp"

Description

template<typename T>
class lib::UninitialisedDynBlock< T >

Managed uninitialised Heap-allocated storage with array like access.

Template Parameters
Tthe nominal type assumed to sit in each »slot«

Definition at line 129 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
 
UninitialisedDynBlockoperator= (UninitialisedDynBlock &&)=delete
 
UninitialisedDynBlockoperator= (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}
 
+ Inheritance diagram for UninitialisedDynBlock< T >:
+ Collaboration diagram for UninitialisedDynBlock< T >:

The documentation for this class was generated from the following file: