diff --git a/llvm/include/llvm/ADT/Sequence.h b/llvm/include/llvm/ADT/Sequence.h index 88a6fa9205983..1153352d8b24f 100644 --- a/llvm/include/llvm/ADT/Sequence.h +++ b/llvm/include/llvm/ADT/Sequence.h @@ -125,8 +125,8 @@ template bool canTypeFitValue(const U Value) { // - its internal representation overflows. struct CheckedInt { // Integral constructor, asserts if Value cannot be represented as intmax_t. - template ::value, bool> = 0> + template ::value, bool> = 0> static CheckedInt from(Integral FromValue) { if (!canTypeFitValue(FromValue)) assertOutOfBounds(); @@ -137,7 +137,7 @@ struct CheckedInt { // Enum constructor, asserts if Value cannot be represented as intmax_t. template ::value, bool> = 0> + std::enable_if_t::value, bool> = 0> static CheckedInt from(Enum FromValue) { using type = std::underlying_type_t; return from(static_cast(FromValue)); @@ -162,8 +162,8 @@ struct CheckedInt { } // Convert to integral, asserts if Value cannot be represented as Integral. - template ::value, bool> = 0> + template ::value, bool> = 0> Integral to() const { if (!canTypeFitValue(Value)) assertOutOfBounds(); @@ -173,7 +173,7 @@ struct CheckedInt { // Convert to enum, asserts if Value cannot be represented as Enum's // underlying type. template ::value, bool> = 0> + std::enable_if_t::value, bool> = 0> Enum to() const { using type = std::underlying_type_t; return Enum(to()); diff --git a/llvm/include/llvm/Support/TypeSize.h b/llvm/include/llvm/Support/TypeSize.h index 0777005643a71..9cf2e873d7189 100644 --- a/llvm/include/llvm/Support/TypeSize.h +++ b/llvm/include/llvm/Support/TypeSize.h @@ -93,7 +93,7 @@ class LinearPolyBase { } template - friend typename std::enable_if_t::value, LeafTy> + friend std::enable_if_t::value, LeafTy> operator-(const LeafTy &LHS) { LeafTy Copy = LHS; return Copy *= -1;