fork download
  1. #include <iostream>
  2. #include <ostream>
  3. using namespace std;
  4.  
  5. int test(int&&)
  6. {
  7. return 1;
  8. }
  9. double test(const int&)
  10. {
  11. return 2.5;
  12. };
  13.  
  14. int main()
  15. {
  16. int t;
  17. cout << test(t) << endl;
  18. cout << test(0) << endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
2.5
1