fork(1) download
  1. #include <iostream>
  2. struct A{ int x; };
  3.  
  4. void foo(A &&x){ std::cout<<"&&" <<std::endl; }
  5.  
  6. void foo(A &x){ std::cout<<"&" <<std::endl; }
  7.  
  8. int main() {
  9. foo(A());
  10. A a;
  11. foo(a);
  12. return 0;
  13. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
&&
&