diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2016-07-11 21:38:08 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2016-07-11 21:38:08 +0000 |
commit | dc3eb83d08d63d41824d87e64c10021faee44c6e (patch) | |
tree | 817e696bbdaaadc91e760d0e08b2fd7f8f554ae2 /libcxx/include/vector | |
parent | 83a25792c5c2fc658736af63b7fc51172642be01 (diff) | |
download | bcm5719-llvm-dc3eb83d08d63d41824d87e64c10021faee44c6e.tar.gz bcm5719-llvm-dc3eb83d08d63d41824d87e64c10021faee44c6e.zip |
Always use the allocator to construct/destruct elements of a deque/vector. Fixes PR#28412. Thanks to Jonathan Wakely for the report.
llvm-svn: 275105
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r-- | libcxx/include/vector | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector index 81c514ee6b7..021bbfb6643 100644 --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -1812,9 +1812,9 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) } else { - value_type __tmp(_VSTD::forward<_Args>(__args)...); + __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...); __move_range(__p, this->__end_, __p + 1); - *__p = _VSTD::move(__tmp); + *__p = _VSTD::move(__tmp.get()); } __annotator.__done(); } |