So I've got a function like this:
template <typename T>
bool and_map(vector<T> v, function<bool(T)> fn) { ... }
And I want to pass it a vector and a lambda function like this:
[](int cell){ return(cell != -1); }
But I get an error which says there is no instance of and_map which takes these parameters.
When I do this it works:
template <typename T>
bool and_map(vector<T> v, function<bool(int)> fn) { ... }
How can I get it to work without specifying the parameter type of the passed function?