GitHub Viewer
// This example demonstrates how to attach data to a task and run
// the task iteratively with changing data.
#include
int main(){
tf::Executor executor;
tf::Taskflow taskflow("attach data to a task");
int data;
// create a task and attach it the data
auto A = taskflow.placeholder();
A.data(&data).work([A](){
auto d = *static_cast(A.data());
std::cout