I have a foo which is a std::vector. It represents the \"edge\" values for a set of ranges.
For example, if foo is
What about going straight from Stone Age (bind2nd) to the Iron Age with a C++14 generic lambda, bypassing the Bronze Age (bind)?
std::find_if(foo.begin(), foo.end(), [&](auto const& elem) {
return elem > bar;
});
And if the input is sorted
std::lower_bound(foo.begin(), foo.end(), bar);
Lambdas read much easier and are also easier to inline than std::bind expresions. See e.g. Lavevej's CppCon 2015 talk.