59 if (this->freeIdx == this->capacity) {
60 auto newCapacity = std::max(this->capacity * 2, 4U);
61 auto newData = this->allocator.template alloc<ITEM>(newCapacity);
62 memcpy(newData, this->dataPtr,
sizeof(ITEM) * this->capacity);
63 this->allocator.del(this->dataPtr);
64 this->capacity = newCapacity;
65 this->dataPtr = newData;
68 this->dataPtr[this->
freeIdx] = item;