Hands-On High Performance Programming with Qt 5
上QQ阅读APP看书,第一时间看更新

Problems with exceptions

Exceptions are, 20 years after their inception in C++, still such a controversial topic that some major C++ guidelines (Google's being the most notable example) prohibit their usage. While they are often banned due to difficulties in writing exception-safe code, in some projects, such as in real-time or safety-critical environments, they runtime space and time because they violate the zero-overhead principle with respect to binary image size.

By the way, the Qt API doesn't have exceptions, but not for any of the preceding reasons! In the past, compilers on some target platforms, which Qt wanted to support, simply didn't implement exceptions at that juncture!