Guest User

Untitled

a guest
Jul 20th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <vector>
  2. #include <string>
  3.  
  4.  
  5. namespace Foobar {
  6. struct Test {
  7. std::string f;
  8. std::uint16_t uuid;
  9. };
  10. }
  11.  
  12. bool operator==(const Foobar::Test& lhs, const Foobar::Test& rhs){
  13. return lhs.f == rhs.f && lhs.uuid == rhs.uuid;
  14. }
  15.  
  16.  
  17. int main(){
  18.  
  19. std::vector<Foobar::Test> a;
  20. std::vector<Foobar::Test> b;
  21.  
  22. if(a==b){
  23.  
  24. }
  25.  
  26. return 0;
  27. }
  28.  
  29. #include <vector>
  30. #include <string>
  31.  
  32.  
  33. namespace Foobar {
  34. struct Test {
  35. std::string f;
  36. std::uint16_t uuid;
  37. };
  38.  
  39. bool operator==(const Foobar::Test& lhs, const Foobar::Test& rhs){
  40. return lhs.f == rhs.f && lhs.uuid == rhs.uuid;
  41. }
  42. }
  43.  
  44.  
  45.  
  46. int main(){
  47.  
  48. std::vector<Foobar::Test> a;
  49. std::vector<Foobar::Test> b;
  50.  
  51. if(a==b){
  52.  
  53. }
  54.  
  55. return 0;
  56. }
Add Comment
Please, Sign In to add comment