std::nothrow

This constant value is used as an argument for operator new and operator new[] to indicate that these functions shall not throw an exception on failure, but return a null pointer instead.

int * p = new (std::nothrow) int;
int *p = new(std::nothrow)int[10]
posted @ 2019-08-03 21:03  mingzhang  阅读(319)  评论(0编辑  收藏  举报