Re:GCC 11.1
by spacechild1 on Wednesday April 28, 2021 @06:48AM
(#26967888)
Exactly! It's worth pointing out that 'new (std::nowthrow) T' itself also performs a NULL check, so it doesn't call the constructor if the allocation failed.
AFAIK `new (std::nothrow) T` returns nullptr if allocation fails, like std::malloc.