aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2025-03-06 21:18:21 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2025-03-07 20:36:34 +0000
commite6e7b477bbdbfb3fee6b44087a59f94fd1e2c7a3 (patch)
tree90a0d01ebc70514d6648ca247ec5e97e6758b360 /gcc
parent4b180459626df64dac758da8760d868c2604ddf2 (diff)
downloadgcc-e6e7b477bbdbfb3fee6b44087a59f94fd1e2c7a3.zip
gcc-e6e7b477bbdbfb3fee6b44087a59f94fd1e2c7a3.tar.gz
gcc-e6e7b477bbdbfb3fee6b44087a59f94fd1e2c7a3.tar.bz2
libstdc++: Make std::erase for linked lists convert to bool
LWG 4135 (approved in Wrocław, November 2024) fixes the lambda expressions used by std::erase for std::list and std::forward_list. Previously they attempted to copy something that isn't required to be copyable. Instead they should convert it to bool right away. The issue resolution also changes the lambda's parameter to be const, so that it can't modify the elements while comparing them. libstdc++-v3/ChangeLog: * include/std/forward_list (erase): Change lambda to have explicit return type and const parameter type. * include/std/list (erase): Likewise. * testsuite/23_containers/forward_list/erasure.cc: Check lambda is correct. * testsuite/23_containers/list/erasure.cc: Likewise. Reviewed-by: Patrick Palka <ppalka@redhat.com>
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions