fork(5) download
  1. #include <functional>
  2. #include <vector>
  3.  
  4. template<class T>
  5. struct Identity{
  6. typedef T type;
  7. };
  8.  
  9. template<class T>
  10. void f(std::vector<T> v,
  11. typename Identity<std::function<bool(T)>>::type func)
  12. {
  13. // ...
  14. }
  15.  
  16. int main(){
  17. std::vector<int> v;
  18. f(v, [](int){ return true; });
  19. }
Success #stdin #stdout 0s 3012KB
stdin
Standard input is empty
stdout
Standard output is empty