This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/48038] [C++0x] stable_sort problem with C++0x and comparator by value
- From: "chris at bubblescope dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 9 Mar 2011 11:51:37 +0000
- Subject: [Bug libstdc++/48038] [C++0x] stable_sort problem with C++0x and comparator by value
- Auto-submitted: auto-generated
- References: <bug-48038-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48038
--- Comment #14 from Chris Jefferson <chris at bubblescope dot net> 2011-03-09 11:51:24 UTC ---
Ah yes, I see the problem now.
The problem is to do with using move_iterator. When we compare two values which
we dereference from a move_iterator, then we end up "moving" into the
comparator, which breaks things.
Hmm.. to be honest, this seems like a fairly serious practical flaw in
move_iterator, removing most of the practical reasons for it's presence in the
standard.
I'm having a very quick think about the best way to fix this. Will report back
shortly.