This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/48038] [C++0x] stable_sort problem with C++0x and comparator by value


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

--- Comment #24 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-09 15:53:43 UTC ---
Chris, thanks for dealing with this so quickly.
A small nit, in the new testcase I think the move-assignment operator should
use
    ok = rh.ok;
instead of
    ok = true;
to preserve the "moved-from-ness" of the source.
i.e. move-assigning from a moved-from value should make the target have the
same "valid but unspecified state" as the source.
That's certainly what happens if you move-assign from e.g. an empty unique_ptr,
you don't summon up a new pointee out of nowhere!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]