title: Vector of structs - not seeing my definition for operator==
body: <p>I have a class called Something that has two things: a string, and a vector of instructions. In that class, I want to define operator==. However, I get an error when I try to compile:</p>
  
  <pre><code>error: no match for ‘operator==’ in ‘* __first1 == * __first2’
  </code></pre>
  
  <p>This happened at the line where I am comparing the two vectors in Something using == (since vector has that conveniently defined, I would like to use it).</p>
  
  <p>instruction is as follows:</p>
  
  <pre><code>struct instruction
  {
      int instr;
      int line;
  
      bool operator==(const instruction&amp; rhs)
      {
          return (instr == rhs.instr) &amp;&amp; (line == rhs.line);
      }
  };
  </code></pre>
  
  <p>I've searched for a solution to no avail. It seems that vector from the STL is not seeing the operator== I have defined for my struct when it's comparing these elements.</p>