From 5723da71dc859de6dd3b0330bd7ae815ebe9d3ab Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 20 Oct 2022 16:01:15 +0200 Subject: [PATCH] Utility: more strict CONSTEXPR14 macro Should fix compile errors with partial implementations of C++14 such as GCC 4.8. --- src/Corrade/Utility/Macros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Corrade/Utility/Macros.h b/src/Corrade/Utility/Macros.h index 07252a800..67790db77 100644 --- a/src/Corrade/Utility/Macros.h +++ b/src/Corrade/Utility/Macros.h @@ -394,7 +394,8 @@ Expands to @cpp constexpr @ce on C++14 and newer, empty on C++11. Useful for selectively marking functions that make use of C++14 relaxed constexpr rules. @see @ref CORRADE_CXX_STANDARD */ -#if CORRADE_CXX_STANDARD >= 201402 +#if defined __cpp_constexpr && __cpp_constexpr >= 201304 || \ + defined CORRADE_TARGET_MSVC && _MSC_VER >= 1910 && CORRADE_CXX_STANDARD >= 201402L #define CORRADE_CONSTEXPR14 constexpr #else #define CORRADE_CONSTEXPR14