Suppose I have
typedef std::function<
double(
int,
long
)
> FooType;
and I want to declare function prototypes for a series of functions that I can slot into a std::function
of this type. I know I can write
double foo1(int, long);
double foo2(int, long);
etc., but is there a way I can use FooType
somehow when declaring the function prototypes? Something like
FooType::type foo1, foo2;
Perhaps I might have to use (*foo1)
or similar? Naturally in the implementation of the function I'd need to spell it out long hand so I can put in some parameters, but writing it as above would keep my header file cleaner.