From d16730ce641ff8b770c8364ad1b283f87ab430f0 Mon Sep 17 00:00:00 2001 From: lawadr <3211473+lawadr@users.noreply.github.com> Date: Wed, 22 Mar 2023 15:33:11 +0000 Subject: [PATCH] Change __alignof to alignof Whereas __alignof is a non-standard compiler extension that seems to come from Microsoft and is supported (yet undocumented) by Clang and GCC, alignof is a standard language feature in C++11. Clang and GCC both document __alignof__ as a compiler extension, but this isn't supported by Microsoft. This fixes builds on compilers that don't support __alignof. --- include/vk_mem_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 40c1f7c..2ef9cd9 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -2806,7 +2806,7 @@ static void vma_aligned_free(void* VMA_NULLABLE ptr) #endif #ifndef VMA_ALIGN_OF - #define VMA_ALIGN_OF(type) (__alignof(type)) + #define VMA_ALIGN_OF(type) (alignof(type)) #endif #ifndef VMA_SYSTEM_ALIGNED_MALLOC