, кого это волнует, мы можем динамически распределить пустоту. В моем коде: < /p>
Код: Выделить всё
static const void* padfree = operator new(_arr); //this ignores memory padding
static const void* universal = operator new[](_arr); //used to putting anything
operator new int[]; //ohno he's immortal
Код: Выделить всё
static const void* rawmem = operator new(0); //heap perserved but not actually used
static const void* onlyptr = operator new[](0); //pointer only
operator new int(0); //even he alive??
Подробнее здесь: https://stackoverflow.com/questions/795 ... -not-array
Мобильная версия