|
Boost Users : |
Subject: Re: [Boost-users] [traits/function_types/generic] Can F be called with {a0, ..., aN}?
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-03 04:33:29
Jesse Perla wrote:
> Not sure if this is what you want, but I was pointed to the following
> previously:
>
http://www.boost.org/doc/libs/1_42_0/doc/html/proto/appendices.html#boost_proto.ap
> pendices.implementation.function_arity
>
Exactly what I was looking for! I knew there had to be some nifty trick..
Thanks!
> This works for most function objects, but not for function pointers. To
> implement those, I ended up doing a dispatch and determining if the
> arguments were convertible.
Please find attached my take on it. It should work for function pointers,
function references, member function pointers, and function objects.
Perhaps we can shave it up a bit further and propose to type_traits lib or
the like..
Cheers,
Rutger
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