#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; });
}
I2luY2x1ZGUgPGZ1bmN0aW9uYWw+CiNpbmNsdWRlIDx2ZWN0b3I+Cgp0ZW1wbGF0ZTxjbGFzcyBUPgpzdHJ1Y3QgSWRlbnRpdHl7CiAgdHlwZWRlZiBUIHR5cGU7Cn07Cgp0ZW1wbGF0ZTxjbGFzcyBUPgp2b2lkIGYoc3RkOjp2ZWN0b3I8VD4gdiwgCiAgICB0eXBlbmFtZSBJZGVudGl0eTxzdGQ6OmZ1bmN0aW9uPGJvb2woVCk+Pjo6dHlwZSBmdW5jKQp7CiAgLy8gLi4uCn0KCmludCBtYWluKCl7CiAgc3RkOjp2ZWN0b3I8aW50PiB2OwogIGYodiwgW10oaW50KXsgcmV0dXJuIHRydWU7IH0pOwp9