Commit d821dae
committed
[Backport] Make "key" argument in std::erase_if predicate const.
You're generally not supposed to modify the key in the map while
iterating, or removing elements from the map. The standard seem to
assume the key passed to predicate is const, but most implementations
do not seem to care. In libstdc++ case however this changes with
version 31 from GCC 12. Without const qualifier the code fails to
compile.
Fixes: QTBUG-130707
Bug: 957519
Change-Id: I4b51dcd73c986f8db32653cb3b3a4caaea201752
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5250537
Commit-Queue: Piotr Tworek <piotr.tworek@xperi.com>
Reviewed-by: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1254963}
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/605801
Reviewed-by: Michael Brüning <michael.bruning@qt.io>1 parent a7fd4fa commit d821dae
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
0 commit comments