[Patch] Use variadic templates for tr1::is_function

Paolo Carlini pcarlini@suse.de
Tue Apr 10 18:12:00 GMT 2007


Doug Gregor wrote:

> I'm terrible at declarator syntax :)

:)

> Anyway, this works fine:
>
>     typedef int (*F)(double); // F is the type of a function object. 
> It  happens to be a function pointer
>
>     std::result_of<F(double)>::type // resolves to "int"

Yes, that works fine, I know. Something I do *not* understand, however, 
is why this does not work, what is so different about it:

    typedef int (F)(double);

    std::result_of<F(double)>::type

Maybe I'm missing something, seems certainly useful to me and 
implementable...

Paolo.



More information about the Libstdc++ mailing list