fork download
  1. #include <vector>
  2. #include <string>
  3. #include <set>
  4.  
  5. #include <algorithm>
  6.  
  7. int main()
  8. {
  9. std::vector<int> v1;
  10. std::sort(v1.begin(), v1.end()); //Compiles happily with integers
  11.  
  12. std::vector<double> v2;
  13. std::sort(v2.begin(), v2.end()); //Compiles happily with doubles
  14.  
  15. std::vector<std::string> v3;
  16. std::sort(v3.begin(), v3.end()); //Compiles happily with std::string
  17.  
  18. std::set<int> s1;
  19. s1.find(int()); //Compiles happily with integers
  20.  
  21. std::set<double> s2;
  22. s2.find(double()); //Compiles happily with doubles
  23.  
  24. std::set<std::string> s3;
  25. s3.find(std::string()); //Compiles happily with std::string
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0.01s 2728KB
stdin
Standard input is empty
stdout
Standard output is empty