Template Class span#

Class Documentation#

template<typename Element>
class span#

A type representing a reference to a contiguous buffer of a certain element type

Template Parameters:

Element – the type of each element in the contiguous buffer

Public Functions

span() = default#
inline span(Element *const data, const size_t size)#
template<typename Collection, internal::type_deduction::require_span_convertible_t<Collection, Element> = 0>
inline constexpr span(Collection &&collection)#
template<typename U, std::enable_if_t<std::is_convertible_v<U, Element>, int> = 0>
inline constexpr span(const span<U> &other)#
inline size_t size() const#
inline size_t size_bytes() const#
inline bool empty() const#
inline Element &operator[](const size_t index)#
inline const Element &operator[](const size_t index) const#
inline Element &at(const size_t index)#
inline const Element &at(const size_t index) const#
inline Element *data() const#
inline Element *begin()#
inline Element *end()#
inline const Element *begin() const#
inline const Element *end() const#
inline Element &front()#
inline Element &back()#
inline const Element &front() const#
inline const Element &back() const#
inline span subspan(const size_t offset, const size_t count) const#
inline span subspan(const size_t offset) const#
inline span first(const size_t count) const#
inline span last(const size_t count) const#