fork(1) download
  1. #include <iostream>
  2. #include <limits>
  3. #include <cstdint>
  4. using namespace std;
  5.  
  6. template<class T>
  7. T ala(T&& x) {
  8. x += 1;
  9. return x;
  10. }
  11.  
  12.  
  13. int main() {
  14. int y = 10;
  15. int& x = y;
  16. cout << ala(x) << " " << x << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
11 10