そのような非同期呼び出しにベクトルを渡すにはどうすればよいですか??
std::vector<int> vectorofInts;
vectorofInts.push_back(1);
vectorofInts.push_back(2);
vectorofInts.push_back(3);
std::async([=]
{
//I want to access the vector in here, how do I pass it in
std::vector<int>::iterator position = std::find(vectorofInts.begin(), vectorofInts.end(), 2);
//Do something
}