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:
parent
27e84c5ffc
commit
d30a099cd0
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue