diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index b23188cbdadeb..a5c45a21a2401 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -133,15 +133,6 @@ using is_one_of = std::disjunction...>; template using are_base_of = std::conjunction...>; -namespace detail { -template struct TypesAreDistinct; -template -struct TypesAreDistinct - : std::integral_constant::value && - TypesAreDistinct::value> {}; -template struct TypesAreDistinct : std::true_type {}; -} // namespace detail - /// Determine if all types in Ts are distinct. /// /// Useful to statically assert when Ts is intended to describe a non-multi set @@ -151,9 +142,10 @@ template struct TypesAreDistinct : std::true_type {}; /// asserted once per instantiation of a type which requires it. template struct TypesAreDistinct; template <> struct TypesAreDistinct<> : std::true_type {}; -template -struct TypesAreDistinct - : std::integral_constant::value> {}; +template +struct TypesAreDistinct + : std::conjunction>, + TypesAreDistinct> {}; /// Find the first index where a type appears in a list of types. ///