Skip to content

Commit f79e27d

Browse files
committed
Fix the error: num_tasks cannot be implicitly captured
1 parent 8728cbe commit f79e27d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unittest/taskflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ TEST_CASE("Taskflow.Builder" * doctest::timeout(5)){
120120
}
121121

122122
SUBCASE("Gather"){
123-
auto dst = tf.silent_emplace([&counter]() { REQUIRE(counter == num_tasks - 1);});
123+
auto dst = tf.silent_emplace([&counter, num_tasks]() { REQUIRE(counter == num_tasks - 1);});
124124
for(size_t i=1;i<num_tasks;i++){
125125
silent_tasks.emplace_back(tf.silent_emplace([&counter]() {counter += 1;}));
126126
}

0 commit comments

Comments
 (0)