[llvm] [ADT] Fix llvm::concat_iterator for `ValueT == common_base_class *` (PR #144744)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 18:25:10 PDT 2025


================
@@ -996,13 +996,18 @@ class concat_iterator
 
   static constexpr bool ReturnsByValue =
       !(std::is_reference_v<decltype(*std::declval<IterTs>())> && ...);
-
+  static constexpr bool ReturnsConvertibleType =
+      (!std::is_same_v<
+           std::remove_reference_t<decltype(*std::declval<IterTs>())>,
+           ValueT> ||
----------------
kuhar wrote:

This is quite complicated and it's not clear to me what the negation operator applies to. Maybe hoist this to a helper struct and add tests with static_assert?

https://github.com/llvm/llvm-project/pull/144744


More information about the llvm-commits mailing list