How to rewrite new[](size, alignment, alignmentOffset) with an offset?
Author: Qi-LuCreated Mar 16, 2025Updated Jan 13, 2026
I attempted to rewrite it using the following approach, but it resulted in an error.
void* operator new[](size_t size, size_t alignment, size_t alignmentOffset, const char* pName, int flags, unsigned debugFlags, const char* file, int line) { return ::operator new [](size,static_cast<std::align_val_t>(alignment)); }
Source: electronicarts/EASTL