Implement TODO for implicit C-array-to-ArrayRef conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Frits van Bommel 2011-02-23 13:43:06 +00:00
parent 7d83dc0424
commit 438208e8cb

View File

@ -64,7 +64,10 @@ namespace llvm {
/*implicit*/ ArrayRef(const std::vector<T> &Vec)
: Data(Vec.empty() ? (T*)0 : &Vec[0]), Length(Vec.size()) {}
// TODO: C arrays.
/// Construct an ArrayRef from a C array.
template <size_t N>
/*implicit*/ ArrayRef(const T (&Arr)[N])
: Data(Arr), Length(N) {}
/// @}
/// @name Simple Operations