Title
Potentially-throwing unevaluated operands
Status
tentatively ready
Section
14.5 [except.spec]
Submitter
Richard Smith

Created on 2018-05-06.00:00:00 last changed 1 week ago

Messages

Date: 2025-12-05.21:43:30

Proposed resolution (approved by CWG 2025-12-05):

Change in 14.5 [except.spec] paragraph 6 as follows:

An expression E is potentially-throwing if
  • ...
  • any of the immediate subexpressions (6.10.1 [intro.execution]) of E that is not an unevaluated operand is potentially-throwing.
Date: 2018-05-06.00:00:00

Consider:

  void f();                          // potentially throwing
  bool b = noexcept(noexcept(f()));  // ought to be "true"

The specification does not properly handle subexpressions of the noexcept operator that are not potentially evaluated (and thus cannot contribute to any exception throwing).

History
Date User Action Args
2025-12-05 21:43:30adminsetstatus: open -> tentatively ready
2025-11-19 19:59:28adminsetmessages: + msg8400
2018-05-06 00:00:00admincreate