bf.cxx: In function 'bool cmp(func_type)': bf.cxx:9: error: ambiguous overload for 'operator==' in 'f == boost::function >()' bf.cxx:9: note: candidates are: operator==(void (boost::function1 >::dummy::*)(), void (boost::function1 >::dummy::*)()) /usr/local/include/boost/function/function_template.hpp:706: note: void boost::operator==(const boost::function1&, const boost::function1&) [with R = void, T0 = int, Allocator = std::allocator] /usr/local/include/boost/function/function_base.hpp:647: note: typename boost::enable_if_c::value>::value, bool>::type boost::operator==(Functor, const boost::function_base&) [with Functor = boost::function >] /usr/local/include/boost/function/function_base.hpp:638: note: typename boost::enable_if_c::value>::value, bool>::type boost::operator==(const boost::function_base&, Functor) [with Functor = boost::function >] /usr/local/include/boost/function_equal.hpp: In function 'bool boost::function_equal_impl(const F&, const G&, long int) [with F = boost::function >, G = boost::function >]': /usr/local/include/boost/function_equal.hpp:24: instantiated from 'bool boost::function_equal(const F&, const G&) [with F = func_type, G = func_type]' bf.cxx:16: instantiated from here /usr/local/include/boost/function_equal.hpp:17: error: ambiguous overload for 'operator==' in 'f == g' /usr/local/include/boost/function_equal.hpp:17: note: candidates are: operator==(void (boost::function1 >::dummy::*)(), void (boost::function1 >::dummy::*)()) /usr/local/include/boost/function/function_base.hpp:638: note: typename boost::enable_if_c::value>::value, bool>::type boost::operator==(const boost::function_base&, Functor) [with Functor = boost::function >] /usr/local/include/boost/function/function_base.hpp:647: note: typename boost::enable_if_c::value>::value, bool>::type boost::operator==(Functor, const boost::function_base&) [with Functor = boost::function >] /usr/local/include/boost/function/function_template.hpp:706: note: void boost::operator==(const boost::function1&, const boost::function1&) [with R = void, T0 = int, Allocator = std::allocator]