Comparing two instances of the following struct, I receive an error:
struct MyStruct1 { MyStruct1(const MyStruct2 &_my_struct_2, const int _an_int =
In C++, structs do not have a comparison operator generated by default. You need to write your own:
struct
bool operator==(const MyStruct1& lhs, const MyStruct1& rhs) { return /* your comparison code goes here */ }