sharedVector: count > capacity bugfix (2)

This commit is contained in:
Matej Sekoranja
2013-12-04 10:49:16 +01:00
parent df1d13a155
commit 5bdcaf43db

View File

@@ -360,7 +360,7 @@ public:
size_t new_count = std::min(this->m_count, i);
_E_non_const* temp=new _E_non_const[i];
try{
std::copy(begin(), end(), temp);
std::copy(begin(), begin()+new_count, temp);
this->m_data.reset(temp, detail::default_array_deleter<E*>());
}catch(...){
delete[] temp;