From b7a2c1d3bfbbcd48da29c0d6d8b459aa6413e4cd Mon Sep 17 00:00:00 2001 From: attila Date: Wed, 10 Jul 2024 18:58:05 +0200 Subject: [PATCH] CriticalSection: Replace std::aligned_storage_t to avoid C++23 warning --- modules/juce_core/threads/juce_CriticalSection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_core/threads/juce_CriticalSection.h b/modules/juce_core/threads/juce_CriticalSection.h index de043a3f59..2baa4d113a 100644 --- a/modules/juce_core/threads/juce_CriticalSection.h +++ b/modules/juce_core/threads/juce_CriticalSection.h @@ -118,9 +118,9 @@ private: // a block of memory here that's big enough to be used internally as a windows // CRITICAL_SECTION structure. #if JUCE_64BIT - std::aligned_storage_t<44, 8> lock; + alignas (8) std::byte lock[44]; #else - std::aligned_storage_t<24, 8> lock; + alignas (8) std::byte lock[24]; #endif #else mutable pthread_mutex_t lock;