aboutsummaryrefslogtreecommitdiffstats
path: root/include/deque
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
commit51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch)
tree91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /include/deque
parentbb5e33f003797b67974a8893f7f2930fc51b8210 (diff)
downloadsrc-51072bd6bf79ef2bc6a922079bff57c31c1effbc.tar.gz
src-51072bd6bf79ef2bc6a922079bff57c31c1effbc.zip
Vendor import of libc++ release_39 branch r276489:vendor/libc++/libc++-release_39-r276489
Notes
Notes: svn path=/vendor/libc++/dist/; revision=303237 svn path=/vendor/libc++/libc++-release_39-r276489/; revision=303238; tag=vendor/libc++/libc++-release_39-r276489
Diffstat (limited to 'include/deque')
-rw-r--r--include/deque8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/deque b/include/deque
index c6fbd512a1c6..57650427645c 100644
--- a/include/deque
+++ b/include/deque
@@ -2026,7 +2026,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
}
else
{
- value_type __tmp(_VSTD::forward<_Args>(__args)...);
+ __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
iterator __b = __base::begin();
iterator __bm1 = _VSTD::prev(__b);
__alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
@@ -2034,7 +2034,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
++__base::size();
if (__pos > 1)
__b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
- *__b = _VSTD::move(__tmp);
+ *__b = _VSTD::move(__tmp.get());
}
}
else
@@ -2050,14 +2050,14 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
}
else
{
- value_type __tmp(_VSTD::forward<_Args>(__args)...);
+ __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
iterator __e = __base::end();
iterator __em1 = _VSTD::prev(__e);
__alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
++__base::size();
if (__de > 1)
__e = _VSTD::move_backward(__e - __de, __em1, __e);
- *--__e = _VSTD::move(__tmp);
+ *--__e = _VSTD::move(__tmp.get());
}
}
return __base::begin() + __pos;