|
template<size_t N, typename U = Type, EnableNotVoid< U > = true> |
constexpr | Span (U(&itemsArray)[N]) |
|
constexpr | Span () |
| Builds an empty Span. More...
|
|
constexpr | Span (Type *items, SizeType sizeInElements) |
| Builds a Span from an array. More...
|
|
template<typename U = Type> |
constexpr | Span (TypeIfNotVoid< U > &type) |
| Builds a Span from a single object. More...
|
|
template<typename U = Type> |
constexpr | Span (std::initializer_list< TypeIfNotVoid< U > > list) |
| Span specialized constructor (mainly used for converting const char* to StringView) More...
|
|
template<typename U = Type> |
| operator Span< const TypeIfNotVoid< U > > () const |
|
template<typename U = Type> |
| operator Span< TypeIfNotVoid< U > > () |
|
| operator Span< const void > () const |
|
| operator Span< void > () |
|
template<typename T > |
Span< const T > | reinterpret_as_span_of () const |
| Reinterprets the current span as an array of the specified type. More...
|
|
template<typename T > |
Span< T > | reinterpret_as_span_of () |
| Reinterprets the current span as an array of the specified type. More...
|
|
template<typename T > |
T * | start_lifetime_as_array () const noexcept |
|
template<typename T > |
T * | start_lifetime_as_array () noexcept |
|
template<typename T > |
const T * | start_lifetime_as () const noexcept |
|
template<typename T > |
T * | start_lifetime_as () noexcept |
|
constexpr const Type * | begin () const |
| Returns pointer to first element of the span. More...
|
|
constexpr const Type * | end () const |
| Returns pointer to one after the last element of the span. More...
|
|
constexpr const Type * | data () const |
| Returns pointer to first element of the span. More...
|
|
constexpr Type * | begin () |
| Returns pointer to first element of the span. More...
|
|
constexpr Type * | end () |
| Returns pointer to one after the last element of the span. More...
|
|
constexpr Type * | data () |
| Returns pointer to first element of the span. More...
|
|
constexpr SizeType | sizeInElements () const |
| Size of Span in elements. More...
|
|
constexpr SizeType | sizeInBytes () const |
| Size of Span in bytes. More...
|
|
constexpr bool | sliceStart (SizeType offsetInElements, Span &destination) const |
| Creates another Span, starting at an offset in elements from current Span, until end. More...
|
|
constexpr bool | sliceStartLength (SizeType offsetInElements, SizeType lengthInElements, Span &destination) const |
| Creates another Span, starting at an offset in elements from current Span of specified length. More...
|
|
bool | sliceFromStartUntil (Span other, Span &output) const |
| Creates another Span shorter or equal than the current one such that its end equals other.data(). More...
|
|
constexpr bool | empty () const |
| Check if Span is empty. More...
|
|
template<typename U > |
constexpr bool | contains (const U &value, SizeType *index=nullptr) const |
| Check if the current span contains a given value. More...
|
|
template<typename Lambda > |
constexpr bool | find (Lambda &&lambda, SizeType *index=nullptr) const |
| Finds the first item in span matching criteria given by the lambda. More...
|
|
template<typename U = Type> |
TypeIfNotVoid< U > & | operator[] (SizeType idx) |
|
template<typename U = Type> |
const TypeIfNotVoid< U > & | operator[] (SizeType idx) const |
|
template<typename IntType > |
Type * | get (IntType idx) |
| Gets the item at given index or nullptr if index is negative or bigger than size. More...
|
|
template<typename IntType > |
const Type * | get (IntType idx) const |
| Gets the item at given index or nullptr if index is negative or bigger than size. More...
|
|
template<typename U > |
bool | memcmpWith (const Span< U > other) const |
| Compares this span with another one byte by byte. More...
|
|
template<typename U > |
bool | memcpyTo (Span< U > &other) const |
| Bitwise copies contents of this Span over another (non-overlapping) More...
|
|
template<typename Type>
struct SC::Span< Type >
View over a contiguous sequence of items (pointer + size in elements).
- Template Parameters
-