Title
Clarify which exceptions are propagated
Status
new
Section
[utility.requirements]
Submitter
Johel Ernesto Guerrero Peña

Created on 2021-11-01.00:00:00 last changed 1 week ago

Messages

Date: 2021-11-14.19:01:41

Proposed resolution:

This wording is relative to N4901.

  1. Add a new subclause [exception.propagation] at the end of [utility.requirements] (after [allocator.requirements.completeness]):

    16.4.4.? Exception propagation requirements [exception.propagation]

    -?- Some functions defined in the C++ standard library impose requirements and guarantees R-G when a described evaluation E exits via an exception. Let F be an evaluation that is implied by evaluating E up to the complete evaluation of its enclosing full-expression. Unless stated otherwise, an execution of F that exits via an exception also has R-G imposed. [Note ?: This includes when initializing and destroying parameters, evaluating default arguments, and destroying temporaries (including discarded-value expressions) ([expr.call]) exit via an exception. — end note]

Date: 2021-11-01.00:00:00

This originated from the editorial issues #4863 and #4869.

Some Throws: elements are specified to throw the exceptions an evaluation of E exits with. This wording excludes exceptions thrown involving the initialization and destruction of parameters of E, temporaries of E, and the destruction of the result of E.

The proposed wording below fixes this with front matter. As if affects more than just Throws: elements, it talks about requirements and guarantees when E exits via an exception.

As noted in the originating editorial issues, some LWG members prefer fixing each individual case of wording used to describe exception propagation rather than patching them up with front matter.

History
Date User Action Args
2021-11-14 19:01:41adminsetmessages: + msg12223
2021-11-01 00:00:00admincreate