Last Updated: June 6, 2026
noexcept is a promise. When you put it on a function, you're telling the compiler and every reader of your code that the function will not let an exception escape. The compiler trusts that promise, generates simpler code around the call site, and the standard library uses the promise to pick faster algorithms for things like vector growth and container moves. This lesson covers the syntax, the operator, why move constructors depend on it, what happens when a noexcept function throws anyway, and how to write functions whose noexcept status depends on the operations they perform inside.