28template <
typename ItemType,
typename SizeType>
53 template <
typename OtherItem,
typename OtherSize>
61 template <
typename OtherItem,
typename OtherSize>
117 throw std::out_of_range(
"Index outside of range.");
ArrayRef(const ArrayRef< OtherItem, OtherSize > &other)
Initializes instance as copy of other one.
Iterator begin() const
Iterator referencing to the first item.
Item & operator[](Index index) const
Accesses to item by index.
ArrayRef & operator=(const ArrayRef< OtherItem, OtherSize > &other)
Re-initializes instance as copy of the other one.
Item & at(const Index index) const
Accesses to item by index checking access bounds.
ArrayRef(Item *const items, const Size itemsCount)
Initializes instance referencing to given data.
Iterator end() const
Iterator referencing to the item behind the last item.
bool empty() const
Indicates whether array has no items.
void reset(Item *const items=0, const Size size=0)
Resets array with new items and size.
~ArrayRef()
Destructs the instance.
ArrayRef()
Initializes instance referencing to nothing.