fork download
  1. #include <vector>
  2. #include <functional>
  3. #include <algorithm>
  4.  
  5. void f(std::function<std::vector<int>::iterator (int)>) {}
  6.  
  7. int main()
  8. {
  9. std::vector<int> v{0, 1, 2, 3};
  10.  
  11. auto p = [&] (int n) {
  12. return std::find(v.begin(), v.end(), n);
  13. };
  14.  
  15. f(p);
  16. }
  17.  
  18.  
Success #stdin #stdout 0s 3056KB
stdin
Standard input is empty
stdout
Standard output is empty