diff --git a/libs/pika/execution/tests/unit/algorithm_ensure_started.cpp b/libs/pika/execution/tests/unit/algorithm_ensure_started.cpp index 033996ca2..1d67a9234 100644 --- a/libs/pika/execution/tests/unit/algorithm_ensure_started.cpp +++ b/libs/pika/execution/tests/unit/algorithm_ensure_started.cpp @@ -150,6 +150,7 @@ int main() PIKA_TEST(set_error_called); } +#if !defined(PIKA_HAVE_STDEXEC) { std::atomic set_error_called{false}; auto s = @@ -160,6 +161,7 @@ int main() ex::start(os); PIKA_TEST(set_error_called); } +#endif // It's allowed to discard the sender from ensure_started {