title: unordered_set: invalid operands to binary expression ('const Play' and 'const Play')
body: <p>I'm getting this error when I try to insert an element into an unordered_set:</p>
  
  <pre><code>error: invalid operands to binary expression ('const Play' and 'const Play')
          {return __x == __y;}
  </code></pre>
  
  <p>Here's a screenshot of the whole error:
  <a href="https://www.dropbox.com/s/nxq5skjm5mvzav3/Screenshot%202013-11-21%2020.11.24.png" rel="nofollow">https://www.dropbox.com/s/nxq5skjm5mvzav3/Screenshot%202013-11-21%2020.11.24.png</a></p>
  
  <p>This is my hash function: </p>
  
  <pre><code>struct Hash {
  
          size_t operator() (Play &amp;play) {
  
              unsigned long hash = 5381;
              int c;
  
              string s_str = play.get_defense_name() + play.get_offense_name() + play.get_description();
              const char * str = s_str.c_str();
  
              while ( (c = *str++) )
                  hash = ((hash &lt;&lt; 5) + hash) + c; /* hash * 33 + c */
  
              cout &lt;&lt; hash &lt;&lt; endl;
              return hash;
  
         }
      };
  </code></pre>
  
  <p>This is where I declare the unordered_list:</p>
  
  <pre><code>unordered_set&lt;Play, Hash&gt; Plays;
  </code></pre>
  
  <p>And this is my overloaded <code>==</code> for my <code>Play</code> class:</p>
  
  <pre><code>friend bool operator== (Play&amp; p1, Play&amp; p2)
      {
          return 
              (p1.get_defense_name() == p2.get_defense_name()) &amp;&amp; 
              (p1.get_offense_name() == p2.get_offense_name()) &amp;&amp;
              (p1.get_description() == p2.get_description()); 
      }
  </code></pre>
  
  <p>Any idea what could be going on here? </p>
  
  <p>Thanks.</p>