Pavel Antokolsky aka Zigmar wrote:
'T' is deduced to a function /pointer/. You have to use the plain function type (without the pointer on top) for 'function_traits' to work:
typedef typename boost::function_traits< typename boost::remove_pointer<T>::type >::result_type X; Ah, thanks. That what I've been missing. I can of course "remove_pointer", but what I'm wandering, is why the function_traits tries to add pointer in a first place?
It's done to please broken compilers, I guess.
Further, usually you want to accept both function objects and function
pointers:
template