title: No == operator found while comparing structs in C++
body: <p>Comparing two instances of the following struct, I receive an error:</p>
  
  <pre><code>struct MyStruct1 {
      MyStruct1(const MyStruct2 &amp;_my_struct_2, const int _an_int = -1) :
          my_struct_2(_my_struct_2),
          an_int(_an_int)
      {}
  
      std::string toString() const;
  
      MyStruct2 my_struct_2;
      int an_int;
  };
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>error C2678: binary '==' : no operator
    found which takes a left-hand operand
    of type 'myproj::MyStruct1' (or there
    is no acceptable conversion)</p>
  </blockquote>
  
  <p>Why?</p>