aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2020-08-08 22:22:00 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 15:08:01 -0300
commit1ee95c39a6f00520a98cb2de42785b7706479747 (patch)
tree08d0a5b12befd0d42e91834eb876ccfd4b690ad4 /gcc
parent5aada0ea0402d89acc14184cf699e2a09e583c37 (diff)
downloadgcc-1ee95c39a6f00520a98cb2de42785b7706479747.zip
gcc-1ee95c39a6f00520a98cb2de42785b7706479747.tar.gz
gcc-1ee95c39a6f00520a98cb2de42785b7706479747.tar.bz2
libstdc++: Implement DR 526 on [forward_]list remove_if/unique [PR 91620]
Respect DR 526 in implementation of std::[forward_]list remove/remove_if/unique. [forward_]list::remove was already implementing it but the implementation has been modified to generalize the following pattern. All nodes to remove are collected in an intermediate [forward_]list which purpose is just to be detroyed once out of scope. libstdc++-v3/ChangeLog: PR libstdc++/91620 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes to destroy in an intermediate forward_list. (forward_list<>::remove_if, forward_list<>::unique): Likewise. * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise. (list<>::remove_if): Likewise. * include/debug/forward_list (forward_list<>::_M_erase_after): Remove. (forward_list<>::erase_after): Adapt. (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to destroy in an intermediate forward_list. (forward_list<>::unique): Likewise. * include/debug/list (list<>::remove, list<>::unique): Likewise. (list<>::remove_if): Likewise. * testsuite/23_containers/forward_list/operations/91620.cc: New test. * testsuite/23_containers/list/operations/91620.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions