Span< T > Class Template Reference
|
CPP API
|
mio::Span< T > Class Template Reference
a reference to any contigiuous array of objects. More...
#include <span.h>
Public Member Functions | |
| const T * | begin () const |
| get an iterator to the first element. More... | |
| const T * | end () const |
| get an iterator to one past the last element. More... | |
| const T * | get_ptr () const |
| get the adress of the beginning of array. More... | |
| size_t | size () const |
| get the number of elements in the array More... | |
| Span ()=default | |
| empty span. More... | |
| template<class Cont > | |
| Span (const Cont &c) | |
| construct from a container. More... | |
| Span (const T *ptr, size_t size) | |
| construct from ptr and size. More... | |
| template<size_t N> | |
| Span (T(&p)[N]) | |
| construct from a c array. More... | |
Private Attributes | |
| const T * | m_ptr = nullptr |
| size_t | m_size = 0 |
Detailed Description
template<class T>
class mio::Span< T >
a reference to any contigiuous array of objects.
Constructor & Destructor Documentation
◆ Span() [1/4]
◆ Span() [2/4]
construct from a container.
e.g. std::vector or std::array
◆ Span() [3/4]
construct from a c array.
◆ Span() [4/4]
construct from ptr and size.
Member Function Documentation
◆ begin()
template<class T >
|
inline |
get an iterator to the first element.
◆ end()
template<class T >
|
inline |
get an iterator to one past the last element.
◆ get_ptr()
template<class T >
|
inline |
get the adress of the beginning of array.
◆ size()
template<class T >
|
inline |
get the number of elements in the array
Member Data Documentation
◆ m_ptr
template<class T >
|
private |
◆ m_size
template<class T >
|
private |
Generated by