Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- #include <string>
- namespace Foobar {
- struct Test {
- std::string f;
- std::uint16_t uuid;
- };
- }
- bool operator==(const Foobar::Test& lhs, const Foobar::Test& rhs){
- return lhs.f == rhs.f && lhs.uuid == rhs.uuid;
- }
- int main(){
- std::vector<Foobar::Test> a;
- std::vector<Foobar::Test> b;
- if(a==b){
- }
- return 0;
- }
- #include <vector>
- #include <string>
- namespace Foobar {
- struct Test {
- std::string f;
- std::uint16_t uuid;
- };
- bool operator==(const Foobar::Test& lhs, const Foobar::Test& rhs){
- return lhs.f == rhs.f && lhs.uuid == rhs.uuid;
- }
- }
- int main(){
- std::vector<Foobar::Test> a;
- std::vector<Foobar::Test> b;
- if(a==b){
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment