Implement container-based erase and erase_if for all the containers.
https://wg21.link/P1209
Lots of similar changes, over and over.
Paths
| Differential D55532
Implement P1209 - Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20 ClosedPublic Authored by mclow.lists on Dec 10 2018, 4:07 PM.
Details Summary Implement container-based erase and erase_if for all the containers. Lots of similar changes, over and over.
Diff Detail Event TimelineComment Actions Could you please split this change and the changes from class to struct into different patches? That would make it easier to review. Comment Actions
Yes, sorry.
mclow.lists added inline comments.
Comment Actions
This revision is now accepted and ready to land.Dec 14 2018, 8:06 AM
Revision Contents
Diff 178173 include/dequeinclude/forward_list
include/functional
include/list
include/map
include/set
include/string
include/unordered_map
include/unordered_setinclude/vector
include/versiontest/std/containers/associative/map/map.erasure/erase_if.pass.cpp
test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp
test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp
test/std/containers/associative/set/set.erasure/erase_if.pass.cpp
test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp
test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp
test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp
test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp
test/std/containers/sequences/list/list.erasure/erase.pass.cpp
test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp
test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp
test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp
test/std/containers/unord/unord.map/erase_if.pass.cpp
test/std/containers/unord/unord.multimap/erase_if.pass.cpp
test/std/containers/unord/unord.multiset/erase_if.pass.cpp
test/std/containers/unord/unord.set/erase_if.pass.cpp
test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp
test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp
test/std/strings/strings.erasure/erase.pass.cpp
test/std/strings/strings.erasure/erase_if.pass.cpp
www/cxx2a_status.html
|
I see that's what the specification says, but is the unqualified call intended? For a user-defined type, I think this could pick up a custom remove_if through ADL since our deque iterators have the _Tp as a template parameter. Either I'm wrong, or this seems like an undesirable thing.