Fix GB_ENUM on C++

The else branch results in an error from defining a type in a cast.
This commit is contained in:
Snowy
2023-10-13 20:02:51 +02:00
parent aff42affc0
commit 8657d3e4b6

View File

@@ -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))