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) {