News for hackers. Stuff that matters.
Re:GCC 11.1 by qalmakka on Tuesday April 27, 2021 @06:42PM (#26962887)
> You can use new without exceptions, but you can't detect OOM then, if I'm not mistaken.

AFAIK `new (std::nothrow) T` returns nullptr if allocation fails, like std::malloc.

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.