#include void foo() { } void bar() { } int main() { boost::function f = &foo, b = &bar; f == b; }