This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/49559] [C++0x] stable_sort calls self-move-assignment operator
- From: "joerg dot richter at pdv-fs dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Jul 2011 15:13:27 +0000
- Subject: [Bug libstdc++/49559] [C++0x] stable_sort calls self-move-assignment operator
- Auto-submitted: auto-generated
- References: <bug-49559-4@http.gcc.gnu.org/bugzilla/>
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