summaryrefslogtreecommitdiff
path: root/src/localconsts.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-21 21:22:39 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-21 21:22:39 +0300
commit860728a6949cb06191c3f3fee8df091768e7f154 (patch)
treecb5cb17b0f1fc157d2163a6a73c3c0e16d8cedad /src/localconsts.h
parent9decb63d5e8e3b4a080f6095233ba4b470af7bf6 (diff)
downloadmanaverse-860728a6949cb06191c3f3fee8df091768e7f154.tar.gz
manaverse-860728a6949cb06191c3f3fee8df091768e7f154.tar.bz2
manaverse-860728a6949cb06191c3f3fee8df091768e7f154.tar.xz
manaverse-860728a6949cb06191c3f3fee8df091768e7f154.zip
Add support for if constexpr.
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")