summaryrefslogtreecommitdiff
path: root/src/localconsts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/localconsts.h')
-rw-r--r--src/localconsts.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/localconsts.h b/src/localconsts.h
index 63865afc8..dc7723ae3 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -300,6 +300,12 @@
#endif // ENABLE_CHECKS
+#if __cpp_if_constexpr >= 201606
+#define ifconstexpr if constexpr
+#else // __cpp_if_constexpr >= 201606
+#define ifconstexpr if
+#endif // __cpp_if_constexpr >= 201606
+
#ifdef USE_SDL2
PRAGMA45(GCC diagnostic push)
PRAGMA45(GCC diagnostic ignored "-Wswitch-default")