3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00

fix crash in vector::expand()

This commit is contained in:
Nuno Lopes 2017-10-11 02:43:13 +01:00
parent 27e84c5ffc
commit d30a099cd0

View file

@ -87,6 +87,7 @@ class vector {
m_data = reinterpret_cast<T *>(mem + 2);
if (!std::is_trivially_copyable<T>::value) {
static_assert(std::is_move_constructible<T>::value, "");
mem[1] = old_size;
int i = 0;
for (auto I = old_data; I != old_data + old_size; ++I) {
new (&m_data[i++]) T(std::move(*I));