diff --git a/include/exiv2/photoshop.hpp b/include/exiv2/photoshop.hpp index 31c420ad..4b140401 100644 --- a/include/exiv2/photoshop.hpp +++ b/include/exiv2/photoshop.hpp @@ -16,10 +16,10 @@ class IptcData; /// @brief Helper class, has methods to deal with %Photoshop "Information Resource Blocks" (IRBs). struct EXIV2API Photoshop { // Todo: Public for now - static constexpr std::array irbId_{"8BIM", "AgHg", "DCSR", "PHUT"}; //!< %Photoshop IRB markers - static constexpr auto ps3Id_ = "Photoshop 3.0\0"; //!< %Photoshop marker - static constexpr uint16_t iptc_ = 0x0404; //!< %Photoshop IPTC marker - static constexpr uint16_t preview_ = 0x040c; //!< %Photoshop preview marker + static constexpr std::array irbId_{"8BIM", "AgHg", "DCSR", "PHUT"}; //!< %Photoshop IRB markers + static constexpr auto ps3Id_ = "Photoshop 3.0\0"; //!< %Photoshop marker + static constexpr uint16_t iptc_ = 0x0404; //!< %Photoshop IPTC marker + static constexpr uint16_t preview_ = 0x040c; //!< %Photoshop preview marker /// @brief Checks an IRB /// @param pPsData Existing IRB buffer. It is expected to be of size 4. diff --git a/include/exiv2/slice.hpp b/include/exiv2/slice.hpp index 5cca6364..f278c7bc 100644 --- a/include/exiv2/slice.hpp +++ b/include/exiv2/slice.hpp @@ -263,7 +263,7 @@ struct ContainerStorage { using const_iterator = typename container::const_iterator; - using value_type = std::remove_cv_t; + using value_type = typename std::remove_cv::type; /*! * @throw std::out_of_range when end is larger than the container's @@ -324,7 +324,7 @@ struct ContainerStorage { */ template struct PtrSliceStorage { - using value_type = std::remove_cv_t>; + using value_type = typename std::remove_cv::type>::type; using iterator = value_type*; using const_iterator = const value_type*; @@ -423,7 +423,7 @@ struct Slice : public Internal::MutableSliceBase; + using value_type = typename std::remove_cv::type; /*! * @brief Construct a slice of the container `cont` starting at `begin` @@ -476,7 +476,7 @@ struct Slice : public Internal::ConstSliceBase; + using value_type = typename std::remove_cv::type; Slice(const container& cont, size_t begin, size_t end) : Internal::ConstSliceBase(cont, begin, end) { diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index 9cf37588..0c7c906e 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -1261,7 +1261,8 @@ class ValueType : public Value { //! Utility for toInt64, toUint32, etc. template inline I rational_to_integer_helper(size_t n) const { - auto&& [a, b] = value_.at(n); + auto a = value_.at(n).first; + auto b = value_.at(n).second; // Protect against divide-by-zero. if (b <= 0) { @@ -1269,16 +1270,16 @@ class ValueType : public Value { } // Check for integer overflow. - if (std::is_signed_v == std::is_signed_v) { + if (std::is_signed::value == std::is_signed::value) { // conversion does not change sign const auto imin = std::numeric_limits::min(); const auto imax = std::numeric_limits::max(); if (imax < b || a < imin || imax < a) { return 0; } - } else if (std::is_signed_v) { + } else if (std::is_signed::value) { // conversion is from unsigned to signed - const auto imax = std::make_unsigned_t(std::numeric_limits::max()); + const auto imax = typename std::make_unsigned::type(std::numeric_limits::max()); if (imax < b || imax < a) { return 0; } @@ -1289,8 +1290,8 @@ class ValueType : public Value { return 0; } // Inputs are not negative so convert them to unsigned. - const auto a_u = std::make_unsigned_t(a); - const auto b_u = std::make_unsigned_t(b); + const auto a_u = typename std::make_unsigned::type(a); + const auto b_u = typename std::make_unsigned::type(b); if (imax < b_u || imax < a_u) { return 0; }