From 8657d3e4b615e223bbd35d9bad07849750e4a9f2 Mon Sep 17 00:00:00 2001 From: Snowy Date: Fri, 13 Oct 2023 20:02:51 +0200 Subject: [PATCH] Fix GB_ENUM on C++ The else branch results in an error from defining a type in a cast. --- Core/save_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/save_state.h b/Core/save_state.h index 595298863..ceb89c252 100644 --- a/Core/save_state.h +++ b/Core/save_state.h @@ -25,7 +25,7 @@ #endif #endif -#if __clang_major__ >= 8 || __GNUC__ >= 13 +#if __clang_major__ >= 8 || __GNUC__ >= 13 || defined(__cplusplus) #define GB_ENUM(type, ...) enum : type __VA_ARGS__ #else #define GB_ENUM(type, ...) __typeof__((type)((enum __VA_ARGS__)0))