Title
Unspecified exception should not be confused with `dependent_sender_error`
Status
new
Section
[exec.getcomplsigs]
Submitter
Robert Leahy

Created on 2026-09-29.00:00:00 last changed 2 days ago

Messages

Date: 2026-11-12.21:25:48

Proposed resolution:

This wording is relative to N5054.

Modify [exec.getcomplsigs] as indicated:

Let except be an rvalue subexpression of an unspecified class type Except such that move_constructible<Except> && derived_from<Except, exception> is true. Let CHECKED-COMPLSIGS(e) be e if e is a core constant expression whose type satisfies valid-completion-signatures; otherwise, it is the following expression:

(e, throw except unspecified-exception(), completion_signatures())

[...]

  • Otherwise, (throw except unspecified-exception(), completion_signatures())

Date: 2026-09-29.00:00:00

[exec.getcomplsigs] specifies that when completion signatures are not valid an exception of "unspecified class type Except" is thrown. However, this does not prevent Except from being dependent_sender_error, or from being publicly and unambiguously derived from dependent_sender_error. In either case, the handler in [exec.snd.concepts] would interpret the exception as indicating that the sender is dependent, rather than that its completion signatures are invalid for the given cv- and/or ref-qualification and/or environment.

Tim Song has pointed out that wording technology already exists to solve this ([exec.snd.general]): unspecified-exception.

History
Date User Action Args
2026-11-12 21:25:48adminsetmessages: + msg16651
2026-09-29 00:00:00admincreate