From 918ac2b1760c7fcea3df80208cf554cc47e77a5d Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 1 Apr 2024 17:25:50 +0100 Subject: [PATCH] =?UTF-8?q?fix=20#7196:=20make=20the=20code=20C++23=20comp?= =?UTF-8?q?atible=20Nikolaj=20is=20now=20more=20bleeding=20edge=20than=20I?= =?UTF-8?q?=20am...=20I=20must=20be=20getting=20old=3F=20(=CB=98=EF=BD=A5?= =?UTF-8?q?=5F=EF=BD=A5=CB=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/buffer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/buffer.h b/src/util/buffer.h index f40914638..3ca597af2 100644 --- a/src/util/buffer.h +++ b/src/util/buffer.h @@ -21,7 +21,7 @@ Revision History: --*/ #pragma once -#include +#include #include "util/memory_manager.h" template @@ -30,7 +30,7 @@ protected: T * m_buffer = reinterpret_cast(m_initial_buffer); unsigned m_pos = 0; unsigned m_capacity = INITIAL_SIZE; - typename std::aligned_storage::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(m_initial_buffer)) {