Relax fallthrough attribute detection

This commit is contained in:
Victor Zverovich 2019-12-05 10:04:29 -08:00
parent 071794ec65
commit 1219b65f21

View File

@ -69,7 +69,8 @@
# define FMT_HAS_BUILTIN(x) 0
#endif
#if FMT_HAS_CPP_ATTRIBUTE(fallthrough) >= 201603 && __cplusplus >= 201703
#if FMT_HAS_CPP_ATTRIBUTE(fallthrough) && \
(__cplusplus >= 201703 || FMT_GCC_VERSION != 0)
# define FMT_FALLTHROUGH [[fallthrough]]
#else
# define FMT_FALLTHROUGH