
Christian Larsen skrev:
Hah, what a coincidence. I see that Hajo Kirchhoff has just asked basically the same question two hours before me.
Hm, found an answer in a previous thread: http://lists.boost.org/boost-users/2005/05/11987.php But then what about using contains? This doesn't compile either: #include <boost/function.hpp> using namespace boost; void listenerA() {} void listenerB() {} int main() { typedef function<void ()> Listener; Listener a = listenerA; Listener b = listenerB; bool equal; // None of these compile: equal = (a == b); equal = function_equal(a, b); equal = a.contains(b); equal = a.contains(a); return 0; } What to do, revert to raw function pointers? --Christian