struct MyObj {
  int getID() {return 2;} 
};

struct MyObj2 {
  int getID() {return 3;}    
};

#include <vector>
#include <algorithm>
#include <iostream>

int main() {
std::vector<MyObj> v;
std::vector<MyObj2> _z;

for (unsigned i=0; i < _z.size(); i++)
{
     MyObj2 _g = _z.at(i);

     auto iter = std::find_if(v.begin(), v.end(), [&](MyObj o) 
     {
        if (o.getID() == _g.getID())
        {
            std::cout << "we have a match" << std::endl;
            return true;
        }
        else
        {
            std::cout << "we DO NOT have a match" << std::endl;
            return false;
       }
    });
}

}