
27 Sep
2008
27 Sep
'08
5:55 p.m.
Joel de Guzman wrote:
AFAIR, the old standard library result_type protocol is compatible with the result_of protocol.
std::result_of<F(the args types)> uses F::result_type if it exists, but the other way around is of course not possible, since result_type can only work with monomorphic functors. So if I have a function that expects a functor F that provides F::result_type, the fact that the functor provides std::result_of<F(the args types)>::type, doesn't really help since it doesn't guarantee F::result_type is available.