title: C++ comparing two objects
body: <p>I got this function:</p>
  
  <pre><code>bool operator==(const foo&amp; foo1, const foo&amp; foo2)
  </code></pre>
  
  <p>how do I compare the two objects with each other, is there a library function that allows me to doit? or do I have to physically compare each of the variables inside the objects.</p>
  
  <p>EDIT:</p>
  
  <p><code>foo</code> object holds:</p>
  
  <pre><code>private: 
  int *values;
  size_t *columns; 
  std::map&lt; size_t, std::pair&lt;size_t, unsigned int&gt; &gt; maps;
  </code></pre>