diff options
Diffstat (limited to 'contrib/libc++/include/deque')
-rw-r--r-- | contrib/libc++/include/deque | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/libc++/include/deque b/contrib/libc++/include/deque index e65acfc..b86d77f 100644 --- a/contrib/libc++/include/deque +++ b/contrib/libc++/include/deque @@ -1966,6 +1966,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args) } else { + value_type __tmp(_VSTD::forward<_Args>(__args)...); iterator __b = __base::begin(); iterator __bm1 = _VSTD::prev(__b); __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b)); @@ -1973,7 +1974,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 = value_type(_VSTD::forward<_Args>(__args)...); + *__b = _VSTD::move(__tmp); } } else @@ -1989,13 +1990,14 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args) } else { + value_type __tmp(_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 = value_type(_VSTD::forward<_Args>(__args)...); + *--__e = _VSTD::move(__tmp); } } return __base::begin() + __pos; |