fork download
  1. #include <iostream>
  2. using namespace std;
  3. struct X {};
  4. void f(X& x){
  5. cout<<"usual"<<endl;
  6. }
  7. void f(const X& x){
  8. cout<<"const"<<endl;
  9. }
  10.  
  11.  
  12. int main() {
  13. // your code goes here
  14. X x;
  15. const X cx;
  16. f(x);
  17. f(cx);
  18. return 0;
  19. }
Success #stdin #stdout 0s 4344KB
stdin
Standard input is empty
stdout
usual
const