
1 May
2008
1 May
'08
7:13 p.m.
David Abrahams:
on Tue Apr 29 2008, "Daniel Walker" <daniel.j.walker-AT-gmail.com> wrote: ...
template <class F> typename result_of<F const&()>::type call(F const& f) { return f(); }
Fine, then take the case where call takes f by value; then F can be a function type and result_of<F()> is illegal.
If you call template <class F> typename result_of<F()>::type call( F f ) { return f(); } with a function, F will be deduced as a function pointer.