boost::function typename Signature
How to extract the return type and the argument type list from the type Signature in boost::function<Signature> ? More specifically if I have a object of type boost::function< int ( double)
, the thing "int (double)" is matched with a type. What type is that ? Where can I find it?
Thanks -- View this message in context: http://www.nabble.com/boost%3A%3Afunction-typename-Signature-tp25507953p2550... Sent from the Boost - Users mailing list archive at Nabble.com.
On Fri, Sep 18, 2009 at 8:37 AM, veerus
How to extract the return type and the argument type list from the type Signature in boost::function<Signature> ?
More specifically if I have a object of type boost::function< int ( double)
, the thing "int (double)" is matched with a type. What type is that ? Where can I find it?
Sounds like same thing I ran into. Is this what you are looking for:
// for some reason boost::function_types does not handle boost::functions,
// nor does boost::function have a function::signature typedef,
// so in order to support boost, we use this signature<F>::type mechanism:
template <typename F>
struct signature
{
typedef F type;
};
// specialize for boost::function
template <typename F>
struct signature
participants (2)
-
Gottlob Frege
-
veerus