[PATCH] D10998: Refactor the POCXX allocator-handling into some common routines, and try them out in vector
Marshall Clow
mclow.lists at gmail.com
Thu Jul 9 11:42:42 PDT 2015
mclow.lists updated this revision to Diff 29367.
mclow.lists added a comment.
Wow - this really grew in the telling (as Prof T would say).
I cut this down to just `swap`, and then reworked the swap for all the containers.
Turns out that our swaps were never noexcept for the unordered containers, map and set because we wrapped the comparison operators and the hashers, and the wrappers were not noexcept-swappable.
Lots of tests to make sure that they're right now.
http://reviews.llvm.org/D10998
Files:
include/__hash_table
include/__split_buffer
include/__tree
include/deque
include/forward_list
include/list
include/map
include/memory
include/string
include/unordered_map
include/unordered_set
include/vector
test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp
test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10998.29367.patch
Type: text/x-patch
Size: 82819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150709/1a80fb0e/attachment.bin>
More information about the cfe-commits
mailing list