All challenges
Multiple ChoiceIntermediate 45s

Throwing from a noexcept function

What happens if an exception propagates out of a function declared `noexcept`?
Options
  1. 1std::terminate is called (the program aborts); there is no unwinding past it.
  2. 2The exception is silently ignored, and control resumes at the statement after the throwing call.
  3. 3It is converted into a std::runtime_error, which then propagates to the nearest handler.
  4. 4The function is re-invoked without the noexcept specification, allowing propagation.

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle