#include <functional>
#include <vector>

template<class T>
struct Identity{
  typedef T type;
};

template<class T>
void f(std::vector<T> v, 
    typename Identity<std::function<bool(T)>>::type func)
{
  // ...
}

int main(){
  std::vector<int> v;
  f(v, [](int){ return true; });
}