1 #ifndef CommonTools_Utils_DynArray_H
2 #define CommonTools_Utils_DynArray_H
10 DynArray(
unsigned char * storage,
unsigned int isize) :
a((
T*)(storage)),
s(isize){
13 DynArray(
unsigned char * storage,
unsigned int isize,
T const& it) :
a((
T*)(storage)),
s(isize){
25 unsigned int size()
const {
return s;}
28 #define declareDynArray(T,n,x) alignas(alignof(T)) unsigned char x ## _storage[sizeof(T)*n]; DynArray<T> x(x ## _storage,n)
29 #define initDynArray(T,n,x,i) alignas(alignof(T)) unsigned char x ## _storage[sizeof(T)*n]; DynArray<T> x(x ## _storage,n,i)
32 #endif // CommonTools_Utils_DynArray_H
T const & operator[](unsigned int i) const
DynArray(unsigned char *storage, unsigned int isize, T const &it)
DynArray(unsigned char *storage, unsigned int isize)
unsigned int size() const
T & operator[](unsigned int i)