我怎样才能像这样将向量传递给异步调用?
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
}