12 #ifndef ALLOC_TYPE_HPP
13 #define ALLOC_TYPE_HPP
26 template <
typename T,
size_t length>
109 if (this->count < count) {
126 if (this->count < count) {
131 memset(this->
buffer, 0,
sizeof(T) * count);
161 inline void *
operator new(
size_t size) {
return CallocT<byte>(size); }
168 inline void *
operator new[](
size_t size) {
return CallocT<byte>(size); }
174 inline void operator delete(
void *ptr) {
free(ptr); }
180 inline void operator delete[](
void *ptr) {
free(ptr); }
187 template <
typename T>
212 inline operator T *() {
return this->
ptr; }
214 inline operator const T *()
const {
return this->
ptr; }