...
In this noncompliant code example, an array of int
is created using ::operator new[](std::size_t)
, but and the results of the allocation are not checked. The function is marked as noexcept
, so the caller assumes this function does not throw any exceptions. Because ::operator new[](std::size_t)
can throw an exception if the allocation fails, it could lead to abnormal termination of the program.
...