I am trying to use std::find_if to find an object that matches some criteria. Consider the following:
struct MyStruct { MyStruct(const int & id
You may use the following:
MyStruct toFind(1); std::vector::iterator i = std::find_if(myVector.begin(), myVector.end(), [&](const auto& e) { return e.id == toFind.id; });