Non-owning container taking a pointer to the data buffer and its size and exposing routines for iteration. More...
#include <Span.h>
Non-owning container taking a pointer to the data buffer and its size and exposing routines for iteration.
This is a poor mimic of std::span. If c++20 standard is used than std::span is aliased to Span.
Public Types | |
| using | element_type = T |
| using | value_type = std::remove_cv_t< T > |
| using | reference = T & |
| using | const_reference = T & |
| using | size_type = size_t |
| using | difference_type = std::ptrdiff_t |
| using | iterator = T * |
| using | const_iterator = T const * |
Public Member Functions | |
| Span ()=default | |
| ~Span ()=default | |
| Span (T *data, size_type size) | |
| Span (const Span &source)=default | |
| Span (Span< T > &&source) noexcept | |
| Span & | operator= (const Span &source)=default |
| Span & | operator= (Span &&source) noexcept |
| reference | operator[] (size_type i) |
| const_reference | operator[] (size_type i) const |
| iterator | data () |
| const_iterator | data () const |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| iterator | end () |
| const_iterator | end () const |
| const_iterator | cend () const |
| size_type | size () const |
| bool | empty () const |
Protected Attributes | |
| iterator | m_buffer = nullptr |
| size_type | m_size = 0 |
Friends | |
| void | swap (Span< T > &x, Span< T > &y) |
| Swap content of two Spans. More... | |
| using molpro::linalg::array::span::Span< T >::const_iterator = T const* |
| using molpro::linalg::array::span::Span< T >::const_reference = T& |
| using molpro::linalg::array::span::Span< T >::difference_type = std::ptrdiff_t |
| using molpro::linalg::array::span::Span< T >::element_type = T |
| using molpro::linalg::array::span::Span< T >::iterator = T* |
| using molpro::linalg::array::span::Span< T >::reference = T& |
| using molpro::linalg::array::span::Span< T >::size_type = size_t |
| using molpro::linalg::array::span::Span< T >::value_type = std::remove_cv_t<T> |
|
default |
|
default |
|
inline |
|
default |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
default |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
Swap content of two Spans.
|
protected |
|
protected |