diff --git a/test/when_all_range_test.cpp b/test/when_all_range_test.cpp index 011d81f1..2633f39a 100644 --- a/test/when_all_range_test.cpp +++ b/test/when_all_range_test.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -104,6 +105,18 @@ TEST_F(WhenAllRangeTests, noCopy) { } } +TEST_F(WhenAllRangeTests, canNestInV2Scope) { + // v1::async_scope::detached_spawn()'s requires clause ends up checking + // whether the provided sender can be const-ref-connected, which used to be + // broken for when_all_range + unifex::v1::async_scope scope; + std::vector> v; + v.push_back(unifex::just(42)); + scope.detached_spawn(unifex::when_all_range(std::move(v))); + + unifex::sync_wait(scope.complete()); +} + // TODO: Fix MSVC compilation error with any_unique #ifndef _MSC_VER TEST_F(WhenAllRangeTests, ErrorCancelsRest) {