[font=courier new,courier,monospace]
std::find_if[/font] doesn't return a bunch of iterators. It returns the iterator to the *first* element in the range that satisfies the condition. If you want to iterate over all of the elements that meet a condition, you have to keep refinding. i.e.
std::vector<myObjects::myObjectLib>::iterator findHair;
// This is kinda long, but it's actually not complex
for (findHair = std::find_if(myObject.begin(), myObject.end(), HasFaceId(idx)); findHair != myObject.end(); findHair = std::find_if(findHair + 1, myObject.end(), HasFaceId(idx))
{
// now do something with findHar
}
[edit]
Actually, I'll have to double check if [font=courier new,courier,monospace]findHair = std::find_if(findHair + 1, myObject.end(), HasFaceId(idx))[/font] is prone to any errors, since it's possible [font=courier new,courier,monospace]findHair + 1 == myObject.end()[/font], and [font=courier new,courier,monospace]std::find_if [/font]expects the valid range [first, last) to be given. I'm assuming that it checks if [font=courier new,courier,monospace]first == last[/font] before it begins iterating, but I'll have to double check that.
[edit edit]
Node that this code is the same as just doing
std::vector<myObjects::myObjectLib>::iterator findHair;
// This is kinda long, but it's actually not complex
for (findHair = myObject.begin(); findHair != myObject.end(); ++findHair)
{
if (HasFaceId(findHair, idx))
{
// now do something with findHar
}
}