📅  最后修改于: 2022-03-11 15:04:44.535000             🧑  作者: Mango
// assuming vector
std::find_if(
myVector.begin(), myVector.end(),
[&toFind](const MyStruct& x) { return x.m_id == toFind.m_id;});