[llvm] [ADT] Remove MutableArrayRef(std::array) (NFC) (PR #146114)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 09:53:45 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

This constructor has been subsumed by another constructor of
MutableArrayRef that takes a parameter whose type has data() and
size() methods.


---
Full diff: https://github.com/llvm/llvm-project/pull/146114.diff


1 Files Affected:

- (modified) llvm/include/llvm/ADT/ArrayRef.h (-5) 


``````````diff
diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h
index 3b05cfb326c82..19acd145450a3 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/include/llvm/ADT/ArrayRef.h
@@ -327,11 +327,6 @@ namespace llvm {
                   void>>
     /*implicit*/ constexpr MutableArrayRef(const C &V) : ArrayRef<T>(V) {}
 
-    /// Construct a MutableArrayRef from a std::array
-    template <size_t N>
-    /*implicit*/ constexpr MutableArrayRef(std::array<T, N> &Arr)
-        : ArrayRef<T>(Arr) {}
-
     /// Construct a MutableArrayRef from a C array.
     template <size_t N>
     /*implicit*/ constexpr MutableArrayRef(T (&Arr)[N]) : ArrayRef<T>(Arr) {}

``````````

</details>


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


More information about the llvm-commits mailing list