Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When an exception is thrown, the exception object operand of the throw expression is copied into a temporary object that is used to initialize the handler. The C++ Standard, [except.throw], paragraph 3 [ISO/IEC 14882-2014], states in part:

Throwing an exception copy-initializes a temporary object, called the exception object. The temporary is an lvalue and is used to initialize the variable declared in the matching handler.

...

Bibliography

[Hinnant 2015] 
[ISO/IEC 14882-2014]

Subclause 15.1, "Throwing an Exception"
Subclause 18.8.5, "Exception Propagation"

...