This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Use variadic templates for tr1::is_function
Doug Gregor wrote:
That's not a valid use of result_of.
result_of<F(A1, A2, ..., AN)>::type is the return type when calling a
function object of type F with arguments a1, a2, ..., aN of types A1,
A2, ..., AN, respectively. In your example use, F is "int", which is
not a valid function object.
Humm, ok, thanks, I'm still trying to digest the whole idea...
Now, you could do something like:
result_of<int(double)(double)>::type
That would be int.
But, unless I'm doing some stupid mistake, it doesn't compile...
Paolo.