diff options
Diffstat (limited to 'contrib/libc++/include/vector')
-rw-r--r-- | contrib/libc++/include/vector | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/libc++/include/vector b/contrib/libc++/include/vector index 61f0aef..ee71435 100644 --- a/contrib/libc++/include/vector +++ b/contrib/libc++/include/vector @@ -1681,8 +1681,9 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) } else { + value_type __tmp(_VSTD::forward<_Args>(__args)...); __move_range(__p, this->__end_, __p + 1); - *__p = value_type(_VSTD::forward<_Args>(__args)...); + *__p = _VSTD::move(__tmp); } } else @@ -1970,6 +1971,7 @@ public: typedef allocator_traits<allocator_type> __alloc_traits; typedef typename __alloc_traits::size_type size_type; typedef typename __alloc_traits::difference_type difference_type; + typedef size_type __storage_type; typedef __bit_iterator<vector, false> pointer; typedef __bit_iterator<vector, true> const_pointer; #ifdef _LIBCPP_DEBUG @@ -1991,7 +1993,6 @@ public: typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator; private: - typedef size_type __storage_type; typedef typename __alloc_traits::template #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES rebind_alloc<__storage_type> @@ -2317,7 +2318,7 @@ private: friend class __bit_const_reference<vector>; friend class __bit_iterator<vector, false>; friend class __bit_iterator<vector, true>; - friend class __bit_array<vector>; + friend struct __bit_array<vector>; friend struct _LIBCPP_VISIBLE hash<vector>; }; @@ -2699,6 +2700,7 @@ vector<bool, _Allocator>::operator=(vector&& __v) { __move_assign(__v, integral_constant<bool, __storage_traits::propagate_on_container_move_assignment::value>()); + return *this; } template <class _Allocator> |