title: remove elements with specific value from std::list
body: <p>I need to remove elements with specific value from std::list. With the <code>list&lt;int&gt;</code> I used remove() method.</p>
  
  <p>Now I have <code>list&lt;CMyClass&gt;</code> so I thought I should use remove_if() but it's predicate takes only one paramater - the element to be tested.</p>
  
  <p>How do I write a function <code>foo(const CMyClass &amp;Bad)</code> which removes from list all the elements equal to Bad?</p>
  
  <p>Thanks</p>
  
  <p>PS</p>
  
  <pre><code>struct CMyClass {
      void *Ptr;
      int Var;
  }
  
  bool is_equal(const CMyClass &amp;A, const CMyClass &amp;B)
  {
      if (A.Ptr == B.Prt and A.Var == B.Var)
          return true;
      else
          return false;
  }
  </code></pre>