|
Bifrost SDK
Bifrost SDK documentation
|
The class template span describes an object that can refer to a contiguous sequence of objects with the first element of the sequence at position zero. More...
#include <Span.h>
Public Types | |
| using | element_type = T |
| using | value_type = std::remove_cv_t< T > |
| using | iterator = T * |
| using | const_iterator = T const * |
| using | size_type = size_t |
| using | difference_type = ptrdiff_t |
Public Member Functions | |
| constexpr | Span () noexcept=default |
| Default constructor (empty Span). More... | |
| constexpr | Span (T *data, size_type size) |
| Construct a Span from a pointer and a size. More... | |
| constexpr | Span (T *begin, T *end) |
| Construct a Span from a pointer to the beginning and a pointer to the end. More... | |
| template<typename R , typename = std::enable_if_t<!is_span<R>>> | |
| constexpr | Span (R &&r) |
| constexpr bool | empty () const |
| Check if the Span is empty. More... | |
| constexpr T * | data () const |
| Direct access to the underlying contiguous storage of the Span. More... | |
| constexpr size_type | size () const |
| Returns the number of elements in the Span. More... | |
| constexpr | Span (std::nullptr_t, size_type)=delete |
| Span is not constructible from a nullptr. More... | |
| constexpr | Span (T *, std::nullptr_t)=delete |
| Span is not constructible from a nullptr. More... | |
| constexpr | Span (std::nullptr_t, T *)=delete |
| Span is not constructible from a nullptr. More... | |
| constexpr T const & | operator[] (size_type i) const |
| Access the ith element. More... | |
| constexpr T & | operator[] (size_type i) |
| Access the ith element. More... | |
| constexpr T const & | front () const |
| Access the first element. More... | |
| constexpr T & | front () |
| Access the first element. More... | |
| constexpr T const & | back () const |
| Access the last element. More... | |
| constexpr T & | back () |
| Access the last element. More... | |
| constexpr const_iterator | cbegin () const |
| Returns an iterator to the beginning of the Span. More... | |
| constexpr const_iterator | begin () const |
| Returns an iterator to the beginning of the Span. More... | |
| constexpr iterator | begin () |
| Returns an iterator to the beginning of the Span. More... | |
| constexpr const_iterator | cend () const |
| Returns an iterator to the end of the Span. More... | |
| constexpr const_iterator | end () const |
| Returns an iterator to the end of the Span. More... | |
| constexpr iterator | end () |
| Returns an iterator to the end of the Span. More... | |
The class template span describes an object that can refer to a contiguous sequence of objects with the first element of the sequence at position zero.
std::span from C++20. | using Amino::Span< T >::const_iterator = T const* |
| using Amino::Span< T >::difference_type = ptrdiff_t |
| using Amino::Span< T >::element_type = T |
| using Amino::Span< T >::iterator = T* |
| using Amino::Span< T >::size_type = size_t |
| using Amino::Span< T >::value_type = std::remove_cv_t<T> |
|
constexprdefaultnoexcept |
Default constructor (empty Span).
|
inlineconstexpr |
Construct a Span from a pointer and a size.
Definition at line 57 of file Span.h.
References Amino::Span< T >::data().
|
inlineconstexpr |
Construct a Span from a pointer to the beginning and a pointer to the end.
Definition at line 64 of file Span.h.
References Amino::Span< T >::begin(), and Amino::Span< T >::end().
|
inlineexplicitconstexpr |
|
constexprdelete |
Span is not constructible from a nullptr.
|
constexprdelete |
Span is not constructible from a nullptr.
|
constexprdelete |
Span is not constructible from a nullptr.
|
inlineconstexpr |
Access the last element.
Definition at line 118 of file Span.h.
References Amino::Span< T >::empty().
|
inlineconstexpr |
Access the last element.
Definition at line 114 of file Span.h.
References Amino::Span< T >::empty().
|
inlineconstexpr |
|
inlineconstexpr |
Returns an iterator to the beginning of the Span.
Definition at line 127 of file Span.h.
Referenced by Amino::Span< T >::Span().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Direct access to the underlying contiguous storage of the Span.
Definition at line 140 of file Span.h.
Referenced by Amino::Span< T >::Span().
|
inlineconstexpr |
Check if the Span is empty.
Definition at line 80 of file Span.h.
Referenced by Amino::Span< T >::back(), and Amino::Span< T >::front().
|
inlineconstexpr |
|
inlineconstexpr |
Returns an iterator to the end of the Span.
Definition at line 134 of file Span.h.
Referenced by Amino::Span< T >::Span().
|
inlineconstexpr |
Access the first element.
Definition at line 104 of file Span.h.
References Amino::Span< T >::empty().
|
inlineconstexpr |
Access the first element.
Definition at line 100 of file Span.h.
References Amino::Span< T >::empty().
|
inlineconstexpr |
Access the ith element.
Definition at line 90 of file Span.h.
References Amino::Span< T >::size().
|
inlineconstexpr |
Access the ith element.
Definition at line 86 of file Span.h.
References Amino::Span< T >::size().
|
inlineconstexpr |
Returns the number of elements in the Span.
Definition at line 143 of file Span.h.
Referenced by Amino::Span< T >::operator[]().