5 ms·
There are non-throwing operator new overloads that can return nullptr, but I'm not sure if those are a relatively recent development. Did the non-throwing opera
by aw1621107 4y ago
There are non-throwing operator new overloads that can return nullptr, but I'm not sure if those are a relatively recent development. Did the non-throwing operator new overloads not exist at the time?
- logicchop 4y agoHard to say. Most of the uses probably predated the custom operator new and so nobody thought about it. Not to mention the places you cannot sneak into to switch to std::nothrow.
- aw1621107 4y agoAh, that's fair. Didn't think of code that couldn't be changed.
- bregma 4y ago`new (nothrow)` was in C++98 and in ARM C++ before that.
- aw1621107 4y agoAh, I didn't know that. Thanks!