template<class _Ty, class... _Types>
static _Ty* NewArray(int32_t size)
{
_Ty* ptr = new (std::nothrow) _Ty[size]();
return ptr;
}
error: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
_Ty* ptr = new (std::nothrow) _Ty[numElements]();
85783 – alloc-size-larger-than fires incorrectly with new[] and can't be disabled says that
The code was added in r190546 as a solution to prevent unsigned wrapping (when array new expression must compute the amount of space to allocate as a product of