[Bug libstdc++/49559] [C++0x] stable_sort calls self-move-assignment operator

joerg.richter@pdv-fs.de gcc-bugzilla@gcc.gnu.org
Wed Jul 13 15:14:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49559

--- Comment #22 from joerg.richter@pdv-fs.de 2011-07-13 15:11:21 UTC ---
Is it possible to fix it for 4.6.2?
Following program is a 4.4 regression (when using -std=gnu++0x):

-------8<---------
#include <cassert>
#include <vector>
#include <algorithm>

using namespace std;

int main( int, char** )
{
  vector<int> v;
  v.push_back( 1 );
  stable_sort( &v, &v+1 );
  assert( v.size() == 1 );
  return 0;
}
-------8<---------

Works with 4.4.1, fails with 4.5 and 4.6



More information about the Gcc-bugs mailing list