diff options
| author | David Chisnall <theraven@FreeBSD.org> | 2013-02-07 13:09:19 +0000 |
|---|---|---|
| committer | David Chisnall <theraven@FreeBSD.org> | 2013-02-07 13:09:19 +0000 |
| commit | c7f918d0681828afdbddfdcc354b6f3dfc2a7b68 (patch) | |
| tree | d1f057460d329356b56f67bf5740b7393c925844 /include/vector | |
| parent | fbd326037ffe8b31f74ce56deb05b6432b26665c (diff) | |
Notes
Diffstat (limited to 'include/vector')
| -rw-r--r-- | include/vector | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/vector b/include/vector index 0c2806828334..876b7e5676bd 100644 --- a/include/vector +++ b/include/vector @@ -1458,7 +1458,8 @@ vector<_Tp, _Allocator>::__push_back_slow_path(_Up& __x) allocator_type& __a = this->__alloc(); __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a); // __v.push_back(_VSTD::forward<_Up>(__x)); - __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_++), _VSTD::forward<_Up>(__x)); + __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_), _VSTD::forward<_Up>(__x)); + __v.__end_++; __swap_out_circular_buffer(__v); } @@ -1505,7 +1506,8 @@ vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args) allocator_type& __a = this->__alloc(); __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a); // __v.emplace_back(_VSTD::forward<_Args>(__args)...); - __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_++), _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_), _VSTD::forward<_Args>(__args)...); + __v.__end_++; __swap_out_circular_buffer(__v); } |
