I have the following function declaration:
void get_data(struct myStruct* const value, const void * const data);
I have another function that I want to add a std::function
as a parameter:
// I think the std::function definition is where my problem is
template<typename MyType>
void process(bool test, std::function<void(MyType* const, const void* const)>& callb) { ... }
However I can't quite figure out how to call it, or rather if my definition above is correct:
bool test1 = true;
process<myStruct>(test1, get_data);
Compiler Error:
error: prototype for ‘void process(bool, std::function<void(MyType* const, const void* const)>&)’ does not match any in class ‘MyClass’ void process(bool test, error: candidate is: template<class MyType> void process(bool, std::function<void(MyType*, const void*)>&) void process(bool test, ... goes on
Any ideas?