
18 Sep
2010
18 Sep
'10
6:57 p.m.
I am trying to use objects of boost::function as parameters to overloaded function. However, the compiler fails to automatically resolve the function type when I use a function pointer:
a function pointer is implicitly convertible to boost::function, so there's an ambiguity.
Is there any way to have the accept function call resolved automatically without creating explicit boost::function object?
I don't know what you intend to do inside accept(), but maybe you could make it a template that expect a "callable" parameter.