From 1a40f9660ea1979d29a1585810ba1258678a517f Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 10 Feb 2023 19:31:32 -0800 Subject: [PATCH] replace standard check with feature test macro Signed-off-by: Rosen Penev --- include/exiv2/value.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index c792f094..3a63d805 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -1251,7 +1251,7 @@ class ValueType : public Value { } // Check for integer overflow. -#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L +#ifdef __cpp_if_constexpr if constexpr (std::is_signed_v == std::is_signed_v) { #else if (std::is_signed::value == std::is_signed::value) { @@ -1262,7 +1262,7 @@ class ValueType : public Value { if (imax < b || a < imin || imax < a) { return 0; } -#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L +#ifdef __cpp_if_constexpr } else if constexpr (std::is_signed_v) { #else } else if (std::is_signed::value) {