Skip to content

exec/async_scope.hpp: "invalid use of void expression" in on_empty() with nvcc 12.9 and gcc-12 host compiler #2304

Description

@RohanOnKeys

Including <exec/async_scope.hpp> fails to compile under nvcc with gcc-12 as the host compiler. We observed this in HPX's CUDA CI, where a .cu test pulls in the header through hpx/execution.hpp.

Environment

  • nvcc: CUDA 12.9
  • host compiler: gcc-12
  • stdexec: main

Error
exec/async_scope.hpp:823-825
return when_empty(just());
error: invalid use of void expression

Observed in

Standalone repro (not yet verified outside HPX CI)
// repro.cu
#include <exec/async_scope.hpp>
int main() {}

nvcc -std=c++20 -ccbin g++-12 -I<stdexec>/include -c repro.cu

Notes

Questions

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions