diff --git a/include/exiv2/slice.hpp b/include/exiv2/slice.hpp index be064aecc0..9842ebcb0c 100644 --- a/include/exiv2/slice.hpp +++ b/include/exiv2/slice.hpp @@ -255,7 +255,7 @@ struct ContainerStorage { using iterator = typename container::iterator; using const_iterator = typename container::const_iterator; -#if __cplusplus >= 201402L || _MSVC_LANG >= 201402L +#if __cplusplus >= 201402L || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201402L)) using value_type = std::remove_cv_t; #else using value_type = typename std::remove_cv::type; @@ -320,7 +320,7 @@ struct ContainerStorage { */ template struct PtrSliceStorage { -#if __cplusplus >= 201402L || _MSVC_LANG >= 201402L +#if __cplusplus >= 201402L || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201402L)) using value_type = std::remove_cv_t>; #else using value_type = typename std::remove_cv::type>::type; @@ -423,7 +423,7 @@ struct Slice : public Internal::MutableSliceBase= 201402L || _MSVC_LANG >= 201402L +#if __cplusplus >= 201402L || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201402L)) using value_type = std::remove_cv_t; #else using value_type = typename std::remove_cv::type; @@ -460,7 +460,7 @@ struct Slice : public Internal::ConstSliceBase= 201402L || _MSVC_LANG >= 201402L +#if __cplusplus >= 201402L || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201402L)) using value_type = std::remove_cv_t; #else using value_type = typename std::remove_cv::type; diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index ed9edf622c..0c55d822e0 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -1254,7 +1254,7 @@ class ValueType : public Value { } else if (std::is_signed::value) { #endif // conversion is from unsigned to signed -#if __cplusplus >= 201402L || _MSVC_LANG >= 201402L +#if __cplusplus >= 201402L || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201402L)) const auto imax = static_cast>(std::numeric_limits::max()); #else const auto imax = static_cast::type>(std::numeric_limits::max()); @@ -1269,7 +1269,7 @@ class ValueType : public Value { return 0; } // Inputs are not negative so convert them to unsigned. -#if __cplusplus >= 201402L || _MSVC_LANG >= 201402L +#if __cplusplus >= 201402L || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201402L)) const auto a_u = static_cast>(a); const auto b_u = static_cast>(b); #else