mirror of
https://github.com/Z3Prover/z3
synced 2025-06-02 20:31:21 +00:00
fix crash in vector::expand()
This commit is contained in:
parent
27e84c5ffc
commit
d30a099cd0
1 changed files with 1 additions and 0 deletions
|
@ -87,6 +87,7 @@ class vector {
|
||||||
m_data = reinterpret_cast<T *>(mem + 2);
|
m_data = reinterpret_cast<T *>(mem + 2);
|
||||||
if (!std::is_trivially_copyable<T>::value) {
|
if (!std::is_trivially_copyable<T>::value) {
|
||||||
static_assert(std::is_move_constructible<T>::value, "");
|
static_assert(std::is_move_constructible<T>::value, "");
|
||||||
|
mem[1] = old_size;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (auto I = old_data; I != old_data + old_size; ++I) {
|
for (auto I = old_data; I != old_data + old_size; ++I) {
|
||||||
new (&m_data[i++]) T(std::move(*I));
|
new (&m_data[i++]) T(std::move(*I));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue