Fix usage of enable_if with GCC 8
Seems like the trick with the three dots isn't working with GCC 8 anymore. So let's make it a default template parameter then. Not sure whether GCC 8 is here correct and whether this workaround causes further trouble.
This commit is contained in:
parent
b58eac9302
commit
62999e0be6
|
@ -226,7 +226,7 @@ void MatroskaTrack::assignPropertyFromTagValue(const std::unique_ptr<MatroskaTag
|
|||
}
|
||||
}
|
||||
|
||||
template <typename NumberType, Traits::EnableIf<std::is_integral<NumberType>>...> NumberType tagValueToNumber(const TagValue &tagValue)
|
||||
template <typename NumberType, Traits::EnableIf<std::is_integral<NumberType>>* = nullptr> NumberType tagValueToNumber(const TagValue &tagValue)
|
||||
{
|
||||
// optimization for Latin1/UTF-8 strings
|
||||
if (tagValue.type() == TagDataType::Text) {
|
||||
|
@ -241,7 +241,7 @@ template <typename NumberType, Traits::EnableIf<std::is_integral<NumberType>>...
|
|||
return stringToNumber<NumberType>(tagValue.toString(TagTextEncoding::Utf8));
|
||||
}
|
||||
|
||||
template <typename NumberType, Traits::EnableIf<std::is_floating_point<NumberType>>...> NumberType tagValueToBitrate(const TagValue &tagValue)
|
||||
template <typename NumberType, Traits::EnableIf<std::is_floating_point<NumberType>>* = nullptr> NumberType tagValueToBitrate(const TagValue &tagValue)
|
||||
{
|
||||
return stringToNumber<NumberType>(tagValue.toString(TagTextEncoding::Utf8)) / 1000;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace TagParser {
|
|||
class TAG_PARSER_EXPORT PositionInSet {
|
||||
public:
|
||||
constexpr PositionInSet(int32 position = 0, int32 total = 0);
|
||||
template <typename StringType = std::string, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>...>
|
||||
template <typename StringType = std::string, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>* = nullptr>
|
||||
PositionInSet(const StringType &numericString);
|
||||
|
||||
constexpr int32 position() const;
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
constexpr bool isNull() const;
|
||||
constexpr bool operator==(const PositionInSet &other) const;
|
||||
|
||||
template <typename StringType = std::string, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>...>
|
||||
template <typename StringType = std::string, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>* = nullptr>
|
||||
StringType toString() const;
|
||||
|
||||
private:
|
||||
|
@ -43,7 +43,7 @@ private:
|
|||
* \param numericString Specifies the string containing the position and possibly
|
||||
* the total element count (separated by "/").
|
||||
*/
|
||||
template <typename StringType, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>...>
|
||||
template <typename StringType, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>*>
|
||||
PositionInSet::PositionInSet(const StringType &numericString)
|
||||
: m_position(0)
|
||||
, m_total(0)
|
||||
|
@ -105,7 +105,7 @@ constexpr inline bool PositionInSet::operator==(const PositionInSet &other) cons
|
|||
/*!
|
||||
* \brief Returns the string representation of the current PositionInSet.
|
||||
*/
|
||||
template <typename StringType, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>...>
|
||||
template <typename StringType, Traits::EnableIfAny<Traits::IsSpecializationOf<StringType, std::basic_string>>*>
|
||||
StringType PositionInSet::toString() const
|
||||
{
|
||||
std::basic_stringstream<typename StringType::value_type> ss;
|
||||
|
|
Loading…
Reference in New Issue