| 210 | // task_group_context is known to be at the back of the parameter pack |
| 211 | template<typename F0, typename F1, typename... F> |
| 212 | void parallel_invoke_impl(true_type, F0&& f0, F1&& f1, F&&... f) { |
| 213 | __TBB_STATIC_ASSERT(sizeof...(F)>0, "Variadic parallel_invoke implementation broken?"); |
| 214 | // # of child tasks: f0, f1, and a task for each two elements of the pack except the last |
| 215 | const size_t number_of_children = 2 + sizeof...(F)/2; |
| 216 | parallel_invoke_cleaner cleaner(number_of_children, get_context(std::forward<F>(f)...)); |
| 217 | parallel_invoke_helper& root = cleaner.root; |
| 218 | |
| 219 | root.add_children(std::forward<F>(f)...); |
| 220 | root.add_children(std::forward<F1>(f1)); |
| 221 | root.run_and_finish(std::forward<F0>(f0)); |
| 222 | } |
| 223 | |
| 224 | // task_group_context is not in the pack, needs to be added |
| 225 | template<typename F0, typename F1, typename... F> |
no test coverage detected