Boost logo

Boost Users :

Subject: Re: [Boost-users] Testing whether result_of<F(U)> is a valid expression
From: oswin krause (oswin.krause_at_[hidden])
Date: 2013-02-08 14:33:22


Hi,

thanks for both answers! Jeffreys suggestion is just perfect and so
extremely nice, that i just have to link it :)

http://www.boost.org/doc/libs/1_52_0/doc/html/proto/appendices.html#boost_proto.appendices.implementation.function_arity

awesome stuff!

Also thanks Mathias. Your trick using F::result< F(Block<T>) >::type
instead of boost::result_of is a nice way to solve the problem pre
C++11, however it would not generalize to C++11 compilers where I would
not be able to require the existence of the struct. As I want to support
both, this is unfortunately ruled out. But many thanks!

Greetings,
Oswin

First of all, I can't use C++11, so i am bit a in a disadvantage.

On 08.02.2013 18:26, Mathias Gaunard wrote:
>
>
> Both can be done using SFINAE, the latter will require a recent enough
> compiler that supports generalized SFINAE (GCC does it since 4.6 I
> believe).
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net