How can I avoid using exceptions in C++?

c++, exception

Solution

- Don't throw exceptions.

- Don't use STL (which relies heavily on exceptions).

- Use only `new(std::nothrow)` or override `::operator new` to return 0 on failure.

Note that by avoiding exceptions, you're effectively throwing out lots of useful libraries, including Boost. Basically, you'll have to program everything from scratch.

Problem

What techniques can I use to avoid exceptions in C++, as mentioned in Google's style guide?

Original source