fork download
  1. #include <functional>
  2. #include <iostream>
  3.  
  4. template<class T>
  5. T ken(T t) {
  6. return t;
  7. }
  8.  
  9. int main()
  10. {
  11. std::function<int ()> f = std::bind(&ken<int>, 0);
  12. int n = f();
  13. std::cout << n << std::endl;
  14. }
  15.  
Success #stdin #stdout 0s 3016KB
stdin
Standard input is empty
stdout
0