summaryrefslogtreecommitdiffstats
path: root/libcxx/include/vector
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-09-05 13:50:28 +0000
committerLouis Dionne <ldionne@apple.com>2019-09-05 13:50:28 +0000
commitb370e7691a680b06f3c159c6a19582adf449de90 (patch)
tree91b25bb05f37b2524aca773de335ce2e0c8f9662 /libcxx/include/vector
parentf1b4eba66fb60dc3c6058041a0149883a02383ae (diff)
downloadbcm5719-llvm-b370e7691a680b06f3c159c6a19582adf449de90.tar.gz
bcm5719-llvm-b370e7691a680b06f3c159c6a19582adf449de90.zip
[libc++] Revert "Make `vector` unconditionally move elements when exceptions are disabled."
This reverts r370502, which broke the use case of a copy-only T (with a deleted move constructor) when exceptions are disabled. Until we figure out the right behavior, I'm reverting the commit. llvm-svn: 371068
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r--libcxx/include/vector9
1 files changed, 3 insertions, 6 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index a07243a1345..2d83484aa20 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -948,8 +948,7 @@ void
vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v)
{
__annotate_delete();
- __alloc_traits::__construct_backward_with_exception_guarantees(
- this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
+ __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
_VSTD::swap(this->__begin_, __v.__begin_);
_VSTD::swap(this->__end_, __v.__end_);
_VSTD::swap(this->__end_cap(), __v.__end_cap());
@@ -964,10 +963,8 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
{
__annotate_delete();
pointer __r = __v.__begin_;
- __alloc_traits::__construct_backward_with_exception_guarantees(
- this->__alloc(), this->__begin_, __p, __v.__begin_);
- __alloc_traits::__construct_forward_with_exception_guarantees(
- this->__alloc(), __p, this->__end_, __v.__end_);
+ __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, __p, __v.__begin_);
+ __alloc_traits::__construct_forward(this->__alloc(), __p, this->__end_, __v.__end_);
_VSTD::swap(this->__begin_, __v.__begin_);
_VSTD::swap(this->__end_, __v.__end_);
_VSTD::swap(this->__end_cap(), __v.__end_cap());
OpenPOWER on IntegriCloud