[llvm] [ADT] Fix llvm::concat_iterator for `ValueT == common_base_class *` (PR #144744)
Javier Lopez-Gomez via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 07:41:25 PDT 2025
================
@@ -978,6 +978,17 @@ detail::zip_longest_range<T, U, Args...> zip_longest(T &&t, U &&u,
std::forward<T>(t), std::forward<U>(u), std::forward<Args>(args)...);
}
+/// `all_types_same_as::value == true` if all types in `OtherTs` are same as
+/// `FirstT`, ignoring cv-qualifiers.
+template <typename FirstT, typename... OtherTs> struct all_types_same_as {
+ static constexpr bool value =
+ (std::is_same_v<std::remove_cv_t<OtherTs>, std::remove_cv_t<FirstT>> &&
+ ...);
+};
+template <typename FirstT, typename... OtherTs>
+constexpr bool all_types_same_as_v =
+ all_types_same_as<FirstT, OtherTs...>::value;
----------------
jalopezg-git wrote:
Done :+1: -- thank you for the quick turnaround time!
https://github.com/llvm/llvm-project/pull/144744
More information about the llvm-commits
mailing list