Comparing two instances of the following struct, I receive an error:
struct MyStruct1 { MyStruct1(const MyStruct2 &_my_struct_2, const int _an_int =
You need to explicitly define operator == for MyStruct1.
operator ==
MyStruct1
struct MyStruct1 { bool operator == (const MyStruct1 &rhs) const { /* your logic for comparision between "*this" and "rhs" */ } };
Now the == comparison is legal for 2 such objects.