aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-04-17 22:47:20 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-04-17 22:47:20 +0100
commit8c7100650ef446af8a46ac14042d6ae4a8abd5a6 (patch)
tree01b9b75eee5f0720c6ef40426a35975e2e2cef91 /gcc
parent2ad37a09fa0c457c48dfa83079a9e078e03d5770 (diff)
downloadgcc-8c7100650ef446af8a46ac14042d6ae4a8abd5a6.zip
gcc-8c7100650ef446af8a46ac14042d6ae4a8abd5a6.tar.gz
gcc-8c7100650ef446af8a46ac14042d6ae4a8abd5a6.tar.bz2
PR libstdc++/90105 make forward_list::sort stable
While testing the fix I also discovered that operator== assumes the elements are comparable with operator!= which is not required. PR libstdc++/90105 * include/bits/forward_list.h (operator==): Do not use operator!= to compare elements. (forward_list<T, A>::sort(Comp)): When elements are equal take the one earlier in the list, so that sort is stable. * testsuite/23_containers/forward_list/operations/90105.cc: New test. * testsuite/23_containers/forward_list/comparable.cc: Test with types that meet the minimum EqualityComparable and LessThanComparable requirements. Remove irrelevant comment. From-SVN: r270427
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions