fork(3) download
  1. #include <functional>
  2. #include <iostream>
  3. int main()
  4. {
  5. std::function<int(int)> f = [](int x) { return x; };
  6. std::function<const int&(const int& x)> g = f;
  7. std::cout << g( 42 ) << std::endl;
  8. }
Runtime error #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty