[PATCH] D61366: [libcxx] [test] Don't assert that moved-from containers with non-POCMA allocators are empty.

Billy Robert O'Neal III via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 14 14:47:24 PDT 2019


BillyONeal added a comment.

In D61366#1502073 <https://reviews.llvm.org/D61366#1502073>, @EricWF wrote:

> I'm not sure I agree with your design decision, but this patch LGTM.


I wouldn't object to a standards change to make this the case; though it is suboptimal to destroy all the elements needlessly.

> Are you not allowed to move the containers elements in this case?

Correct. The allocator is not POCMA and not equal, so it's functionally the same as doing assign(make_move_iterator(begin()), make_move_iterator(end())).

Billy3


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61366/new/

https://reviews.llvm.org/D61366





More information about the cfe-commits mailing list