use ::operator new[] to match ::operator delete[]

This commit is contained in:
Noel Berry 2023-03-10 10:26:25 -08:00 committed by GitHub
parent f5db7a37fc
commit 9fcd76a959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ namespace Blah
while (new_capacity < cap) while (new_capacity < cap)
new_capacity *= 2; new_capacity *= 2;
T* new_buffer = (T*)::operator new (sizeof(T) * new_capacity); T* new_buffer = (T*)::operator new[] (sizeof(T) * new_capacity);
if constexpr (std::is_trivially_copyable<T>()) if constexpr (std::is_trivially_copyable<T>())
{ {