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

fix #7196: make the code C++23 compatible

Nikolaj is now more bleeding edge than I am...
I must be getting old? (˘・_・˘)
This commit is contained in:
Nuno Lopes 2024-04-01 17:25:50 +01:00
parent 84092cbd96
commit 918ac2b176

View file

@ -21,7 +21,7 @@ Revision History:
--*/
#pragma once
#include <type_traits>
#include <cstddef>
#include "util/memory_manager.h"
template<typename T, bool CallDestructors=true, unsigned INITIAL_SIZE=16>
@ -30,7 +30,7 @@ protected:
T * m_buffer = reinterpret_cast<T*>(m_initial_buffer);
unsigned m_pos = 0;
unsigned m_capacity = INITIAL_SIZE;
typename std::aligned_storage<sizeof(T), alignof(T)>::type m_initial_buffer[INITIAL_SIZE];
alignas(T) std::byte m_initial_buffer[INITIAL_SIZE * sizeof(T)];
void free_memory() {
if (m_buffer != reinterpret_cast<T*>(m_initial_buffer)) {