From c655780c3474919e9e015461e1a62bc1da6ccbc5 Mon Sep 17 00:00:00 2001 From: James Benton Date: Thu, 19 Jul 2018 08:44:58 +0100 Subject: [PATCH] Fix WUT_CHECK_ macros not being evaluated on C++. static_assert is only defined for C11. --- include/wut_structsize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wut_structsize.h b/include/wut_structsize.h index fb89b371..99ef9c0a 100644 --- a/include/wut_structsize.h +++ b/include/wut_structsize.h @@ -3,7 +3,7 @@ #include // Ensure structs are correct size & offsets -#if defined(static_assert) +#if defined(static_assert) || defined(__cplusplus) # define WUT_CHECK_SIZE(Type, Size) \ static_assert(sizeof(Type) == Size, \ #Type " must be " #Size " bytes")