13 Mar
2007
13 Mar
'07
9:47 a.m.
You can't compare two function<> objects with ==. What you can do is compare a function<> with the actual contents. That is,
void f();
function
f2( f ); f2 == f; // true f2 == f2; // fails at compile time
So if you pass the actual object as 'fun' above, instead of converting it to a function<> first, you should be able to use find_if (or just find).
Thanks a lot, it works. Best regards, Bartek