Add a from C array constructor to ArrayView
This commit is contained in:
parent
bf088a864c
commit
f7b8215a68
|
@ -27,6 +27,9 @@ public:
|
||||||
ArrayView(const T* begin, const T* end)
|
ArrayView(const T* begin, const T* end)
|
||||||
: m_pointer(begin), m_size(end - begin) {}
|
: m_pointer(begin), m_size(end - begin) {}
|
||||||
|
|
||||||
|
template<size_t N>
|
||||||
|
ArrayView(const T(&array)[N]) : m_pointer(array), m_size(N) {}
|
||||||
|
|
||||||
template<typename Iterator>
|
template<typename Iterator>
|
||||||
ArrayView(const Iterator& begin, const Iterator& end)
|
ArrayView(const Iterator& begin, const Iterator& end)
|
||||||
: m_pointer(&(*begin)), m_size(end - begin) {}
|
: m_pointer(&(*begin)), m_size(end - begin) {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user