lst-0469-book.cpp
// https://godbolt.org/z/s8KoE4ETs
#include <new> // nothrow
std::string *ps = new(std::nothrow) std::string{};
if(ps == nullptr) {
std::cerr << "Die Speicheranforderung ging schief\n";
return SOME_ERROR;
}
// https://godbolt.org/z/s8KoE4ETs
#include <new> // nothrow
std::string *ps = new(std::nothrow) std::string{};
if(ps == nullptr) {
std::cerr << "Die Speicheranforderung ging schief\n";
return SOME_ERROR;
}