title: Removing an item from an std:: vector
body: <p>In the 1st code snippet below, I am trying to remove an element from a vector within a member function based on a static condition function fed into std::remove function. Then I am getting lots of template errors shown in the 2nd snippet. Can you please tell me what I am missing?</p>
  
  <p><strong>SNIPPET 1 (CODE)</strong></p>
  
  <pre><code>void removeVipAddress(std::string &amp;uuid)
  {
            struct RemoveCond
            {
              static bool condition(const VipAddressEntity &amp; o)
              {
                return o.getUUID() == uuid;
              }
            };
  
            std::vector&lt;VipAddressEntity&gt;::iterator last =
              std::remove(
                      mVipAddressList.begin(),
                      mVipAddressList.end(),
                      RemoveCond::condition);
  
            mVipAddressList.erase(last, mVipAddressList.end());
  
  }
  </code></pre>
  
  <p><strong>SNIPPET 2</strong> (COMPILATION OUTPUT)</p>
  
  <pre><code> /usr/include/c++/4.7/bits/random.h:4845:5: note: template&lt;class _IntType&gt; bool      std::operator==(const std::discrete_distribution&lt;_IntType&gt;&amp;, const   std::discrete_distribution&lt;_IntType&gt;&amp;)
   /usr/include/c++/4.7/bits/random.h:4845:5: note:   template argument deduction/substitution failed:
   In file included from /usr/include/c++/4.7/algorithm:63:0,
               from Entity.hpp:12:
   /usr/include/c++/4.7/bits/stl_algo.h:174:4: note:   ‘ECLBCP::VipAddressEntity’ is not  derived from ‘const std::discrete_distribution&lt;_IntType&gt;’
   In file included from /usr/include/c++/4.7/random:50:0,
                 from /usr/include/c++/4.7/bits/stl_algo.h:67,
                 from /usr/include/c++/4.7/algorithm:63,
                 from Entity.hpp:12:
   /usr/include/c++/4.7/bits/random.h:4613:5: note: template&lt;class _RealType&gt; bool  std::operator==(const std::extreme_value_distribution&lt;_RealType&gt;&amp;, const  std::extreme_value_distribution&lt;_RealType&gt;&amp;)
   /usr/include/c++/4.7/bits/random.h:4613:5: note:   template argument deduction/substitution failed:
   In file included from /usr/include/c++/4.7/algorithm:63:0,
               from Entity.hpp:12:
   /usr/include/c++/4.7/bits/stl_algo.h:174:4: note:   ‘ECLBCP::VipAddressEntity’ is not  derived from ‘const std::extreme_value_distribution&lt;_RealType&gt;’
  </code></pre>