title: Problems with remove_if in VS2010 when using sets
body: <p>I have the following code.</p>
  
  <pre><code>#include &lt;set&gt;
  #include &lt;algorithm&gt;
  
  using namespace std;
  
  int _tmain(int argc, _TCHAR* argv[])
  {
   typedef set&lt;long&gt; MySet;
  
   MySet a;
  
   for( int i = 0; i &lt; 10; ++i)
   {
    a.insert(i);
   }
  
   MySet::iterator start,end,last;
  
   start = a.begin();
   end = a.end();
  
   last = remove_if(start,end,bind2nd(less_equal&lt;long&gt;(),5));
  
   return 0;
  }
  </code></pre>
  
  <p>Which under VS2005 used to compile fine. However using VS2010 I get the following error:</p>
  
  <p><strong>Error 1 error C3892: '_Next' : you cannot assign to a variable that is const c:\program files\microsoft visual studio 10.0\vc\include\algorithm</strong></p>
  
  <p>If I make the container a vector, everything is fine.</p>
  
  <p>I'm guessing something has changed in the standard that I'm not aware of, can someone please shed some light on why this no longer works?</p>