I have a piece of code that is operating on a std::vector<double> cats
and is doing something like this:
std::find_if(cats.begin(), cats.end(), std::isnan<double>);
this compiles under gcc before 4.3 but no longer compiles with gcc 4.7.2. I get an error like this:
error: no matching function for call to 'find_if(std::vector<double>::iterator, std::vector<double::iterator, <unresolved overloaded function type>)'
How can I get this to compile under newer gcc? And preferably also under the older gcc? Without getting rid of stl and manually writing the loop of course. If it's not possible to do both, the new gcc would suffice and I would leave both implementations in there with a #define
.