Last Updated: May 17, 2026
The noexcept specifier, added in C++11, is a promise you make to the compiler and to readers of your code: this function will not throw any exceptions. That promise unlocks performance optimizations in the standard library (especially in std::vector) and makes failure modes easier to reason about. When the promise is broken at runtime, the program does not recover. It calls std::terminate and dies.