[PATCH] D10998: Refactor the POCXX allocator-handling into some common routines, and try them out in vector

Marshall Clow mclow.lists at gmail.com
Tue Jul 7 08:49:26 PDT 2015


mclow.lists added reviewers: EricWF, K-ballo, howard.hinnant.
mclow.lists added a subscriber: cfe-commits.

Every container in libc++ has a set of routines for handling `propagate_on_container_swap`, `propagate_on_container_move_assignment` and `propagate_on_container_copy_assignment`. They're all basically identical.

Make generic versions of these routines in <memory>, and demonstrate their use in `vector::swap`.

Along the way, update the noexcept() conditions on `vector::swap`

Eventually, propagate this pattern across all the containers.

http://reviews.llvm.org/D10998

Files:
  include/memory
  include/vector
  test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
  test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10998.29184.patch
Type: text/x-patch
Size: 9305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150707/ecfce12b/attachment.bin>


More information about the cfe-commits mailing list