Skip to content

[exec] Cast the return value of the comma expression to void? #7222

Description

@hewillk

There are two (perhaps more) places in [exec] where fold-expression is used to expand the function: [exec.when.all] and [exec.snd.expos]:

[](auto&, auto&, auto&... ops) noexcept -> void {
  (execution::start(ops), ...);
}

Do we need to convert the return result to void as LWG 3755 does to conform to the current best practice of the standard? Is this editorial, or does it require an LWG? Or maybe this is not necessary at all?

Activity

  1. frederick-vs-ja commented on Aug 14, 2024

    @frederick-vs-ja
    Contributor

    Does the return value of execution::start (execution::start_t::operator()) even make sense? If not, perhaps we should just submit an LWG issue to specify that execution::start always returns void.

    FWIW, stdexec's start is already always returning void.

  2. jensmaurer commented on Aug 14, 2024

    @jensmaurer
    Member

    Please submit as an LWG issue. The discussion around LWG3755 indicates there are some non-trivial considerations floating around.

  3. frederick-vs-ja commented on Aug 31, 2024

    @frederick-vs-ja
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lwgIssue must be reviewed by LWG.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions