fork download
  1. #include <algorithm>
  2.  
  3. using namespace std;
  4.  
  5. struct smth
  6. {
  7. int x;
  8.  
  9. void swap(smth &s)
  10. {
  11. ////// error: no matching function for call to ‘smth::swap(int&, int&)’
  12. ////// note: candidate: void smth::swap(smth&)
  13. ////// note: candidate expects 1 argument, 2 provided
  14. ////swap(x, s.x);
  15.  
  16. std::swap(x, s.x);
  17. }
  18. };
  19.  
  20. int main()
  21. {
  22. return 0;
  23. }
Success #stdin #stdout 0s 4388KB
stdin
Standard input is empty
stdout
Standard output is empty