Title
Missing `noexcept` operator in [exec.when.all]
Status
wp
Section
[exec.when.all]
Submitter
Ian Petersen

Created on 2025-03-17.00:00:00 last changed 5 days ago

Messages

Date: 2025-06-23.16:37:24

Proposed resolution:

This wording is relative to N5008.

  1. Modify [exec.when.all] as indicated:

    -7- The member impls-for<when_all_t>::get-state is initialized with a callable object equivalent to the following lambda expression:

    []<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept(noexcept(e)) -> decltype(e) {
      return e;
    }
    
Date: 2025-06-23.16:37:24

[ Sofia 2025-06-21; Status changed: Voting → WP. ]

Date: 2025-06-15.00:00:00

[ 2025-06-13; Reflector poll ]

Set status to Tentatively Ready after seven votes in favour during reflector poll.

Date: 2025-03-17.00:00:00

In [exec.when.all] p7, the impls-for<when_all_t>::get-state member is defined to be equivalent to the following lambda:

[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept(e) -> decltype(e) {
  return e;
}

and e is later defined to be:

std::forward<Sndr>(sndr).apply(make-state<Rcvr>())

Together, the two definitions imply that the `noexcept` clause on the provided lambda is:

noexcept(std::forward<Sndr>(sndr).apply(make-state<Rcvr>()))

which is invalid.

Presumably, the lambda should be defined like so (with an extra `noexcept` operator in the `noexcept` clause):

[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept(noexcept(e)) -> decltype(e) {
  return e;
}
History
Date User Action Args
2025-06-23 16:37:24adminsetmessages: + msg14855
2025-06-23 16:37:24adminsetstatus: voting -> wp
2025-06-13 11:44:36adminsetstatus: ready -> voting
2025-06-13 11:26:30adminsetmessages: + msg14824
2025-06-13 11:26:30adminsetstatus: new -> ready
2025-03-22 11:27:28adminsetmessages: + msg14691
2025-03-17 00:00:00admincreate