diff --git a/Source/Core/Common/EnumFormatter.h b/Source/Core/Common/EnumFormatter.h index d02e5d959a..2df7399fc7 100644 --- a/Source/Core/Common/EnumFormatter.h +++ b/Source/Core/Common/EnumFormatter.h @@ -42,12 +42,9 @@ * constexpr formatter() : EnumFormatter(names) {} * }; */ -template +template class EnumFormatter { - // The second template argument is needed to avoid compile errors from ambiguity with multiple - // enums with the same number of members in GCC prior to 8. See https://godbolt.org/z/xcKaW1seW - // and https://godbolt.org/z/hz7Yqq1P5 using T = decltype(last_member); static_assert(std::is_enum_v); diff --git a/Source/Core/Common/EnumMap.h b/Source/Core/Common/EnumMap.h index 1418c1f01e..1eba9fe513 100644 --- a/Source/Core/Common/EnumMap.h +++ b/Source/Core/Common/EnumMap.h @@ -15,12 +15,9 @@ namespace Common { // A type that allows lookup of values associated with an enum as the key. // Designed for enums whose numeric values start at 0 and increment continuously with few gaps. -template +template class EnumMap final { - // The third template argument is needed to avoid compile errors from ambiguity with multiple - // enums with the same number of members in GCC prior to 8. See https://godbolt.org/z/xcKaW1seW - // and https://godbolt.org/z/hz7Yqq1P5 using T = decltype(last_member); static_assert(std::is_enum_v); static constexpr size_t s_size = static_cast(last_member) + 1; diff --git a/Source/Core/Core/IOS/ES/Formats.cpp b/Source/Core/Core/IOS/ES/Formats.cpp index fe5b7d38f2..6c263e98b4 100644 --- a/Source/Core/Core/IOS/ES/Formats.cpp +++ b/Source/Core/Core/IOS/ES/Formats.cpp @@ -720,9 +720,6 @@ CertReader::CertReader(std::vector&& bytes) : SignedBlobReader(std::move(byt if (!IsSignatureValid()) return; - // XXX: in old GCC versions, capturing 'this' does not work for some lambdas. The workaround - // is to not use auto for the parameter (even though the type is obvious). - // This can be dropped once we require GCC 7. using CertStructInfo = std::tuple; static constexpr std::array types{{ {SignatureType::RSA4096, PublicKeyType::RSA2048, sizeof(CertRSA4096RSA2048)}, diff --git a/Source/Core/VideoCommon/ShaderGenCommon.h b/Source/Core/VideoCommon/ShaderGenCommon.h index acbed7bb2f..7112dd4523 100644 --- a/Source/Core/VideoCommon/ShaderGenCommon.h +++ b/Source/Core/VideoCommon/ShaderGenCommon.h @@ -227,14 +227,11 @@ std::string BitfieldExtract(std::string_view source) static_cast(BitFieldT::NumBits())); } -template +template void WriteSwitch(ShaderCode& out, APIType ApiType, std::string_view variable, const Common::EnumMap& values, int indent, bool break_) { - // The second template argument is needed to avoid compile errors from ambiguity with multiple - // enums with the same number of members in GCC prior to 8. See https://godbolt.org/z/xcKaW1seW - // and https://godbolt.org/z/hz7Yqq1P5 using enum_type = decltype(last_member); // Generate a tree of if statements recursively