fork(2) download
  1. #include <iostream>
  2.  
  3. void foo(int x) { std::cout << "foo(int)" << std::endl; }
  4. void foo(int& x) { std::cout << "foo(int &)" << std::endl; }
  5.  
  6. int main()
  7. {
  8. int i = 42;
  9. static_cast<void (&)(int&)>(foo)(i);
  10. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
foo(int &)