3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

use C++23 conventions in buffer.h

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-03-30 16:26:19 -07:00
parent 287d772ff6
commit b07cb3dc54

View file

@ -30,7 +30,8 @@ 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[sizeof(T)*INITIAL_SIZE];
// typename std::aligned_storage<sizeof(T), alignof(T)>::type m_initial_buffer[INITIAL_SIZE];
void free_memory() {
if (m_buffer != reinterpret_cast<T*>(m_initial_buffer)) {