From 860728a6949cb06191c3f3fee8df091768e7f154 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 21 Aug 2017 21:22:39 +0300 Subject: Add support for if constexpr. --- src/localconsts.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/localconsts.h') 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") -- cgit v1.2.3-70-g09d2