From 1203082a8f1211ad6ce4d95f0c6947f7ecd27a55 Mon Sep 17 00:00:00 2001 From: lizzie Date: Thu, 17 Sep 2026 08:16:18 +0200 Subject: [msvc] fix build errors (#4451) MSVC doesn't consider atomic to be trivially copyable on x86 (why?). And other chary idiosyncrasies from constructing `std::optional` Signed-off-by: lizzie - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4451 Reviewed-by: Maufeat Reviewed-by: CamilleLaVey --- src/common/sparse_large_vector.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/sparse_large_vector.h b/src/common/sparse_large_vector.h index 827944fb08..dad3aea97e 100644 --- a/src/common/sparse_large_vector.h +++ b/src/common/sparse_large_vector.h @@ -38,7 +38,8 @@ void FreeMemoryPages(void* base, std::size_t size) noexcept; /// A large page-aligned buffer that has optimized memory usage for zero-writes. template -requires std::is_trivially_copyable_v + // MSVC doesn't regard structs with atomics as trivially copyable + // requires std::is_trivially_copyable_v class SparseLargeVector final { public: constexpr SparseLargeVector() = default; -- cgit v1.2.3