diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h --- a/llvm/include/llvm/ADT/ArrayRef.h +++ b/llvm/include/llvm/ADT/ArrayRef.h @@ -290,6 +290,10 @@ /// @} }; + /// Explicitly support class template argument deduction. + template + ArrayRef(const T &) -> ArrayRef; + /// MutableArrayRef - Represent a mutable reference to an array (0 or more /// elements consecutively in memory), i.e. a start pointer and a length. It /// allows various APIs to take and modify consecutive elements easily and @@ -444,6 +448,10 @@ } }; + /// Explicitly support class template argument deduction. + template + MutableArrayRef(T &) -> MutableArrayRef; + /// This is a MutableArrayRef that owns its array. template class OwningArrayRef : public MutableArrayRef { public: