aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-11-24 21:09:03 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-11-25 15:06:25 +0000
commitf54ceb2062c7fef294f85ae093914fa6c7ca35b8 (patch)
tree8e935211c279fc7accbe99a5d6fdcc23d59f065d /configure
parent48e4a9d93885b3d82cfcbf1e804fe9c3eaabf157 (diff)
downloadgcc-f54ceb2062c7fef294f85ae093914fa6c7ca35b8.zip
gcc-f54ceb2062c7fef294f85ae093914fa6c7ca35b8.tar.gz
gcc-f54ceb2062c7fef294f85ae093914fa6c7ca35b8.tar.bz2
libstdc++: Call predicate with non-const values in std::erase_if [PR107850]
As specified in the standard, the predicate for std::erase_if has to be invocable as non-const with a non-const lvalues argument. Restore support for predicates that only accept non-const arguments. It's not strictly nevessary to change it for the set and unordered_set overloads, because they only give const access to the elements anyway. I've done it for them too just to keep them all consistent. libstdc++-v3/ChangeLog: PR libstdc++/107850 * include/bits/erase_if.h (__erase_nodes_if): Use non-const reference to the container. * include/experimental/map (erase_if): Likewise. * include/experimental/set (erase_if): Likewise. * include/experimental/unordered_map (erase_if): Likewise. * include/experimental/unordered_set (erase_if): Likewise. * include/std/map (erase_if): Likewise. * include/std/set (erase_if): Likewise. * include/std/unordered_map (erase_if): Likewise. * include/std/unordered_set (erase_if): Likewise. * testsuite/23_containers/map/erasure.cc: Check with const-incorrect predicate. * testsuite/23_containers/set/erasure.cc: Likewise. * testsuite/23_containers/unordered_map/erasure.cc: Likewise. * testsuite/23_containers/unordered_set/erasure.cc: Likewise. * testsuite/experimental/map/erasure.cc: Likewise. * testsuite/experimental/set/erasure.cc: Likewise. * testsuite/experimental/unordered_map/erasure.cc: Likewise. * testsuite/experimental/unordered_set/erasure.cc: Likewise.
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions