MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Public Types | Public Member Functions | List of all members
microstrain::Span< T, DYNAMIC_EXTENT > Struct Template Reference

#include <span.hpp>

Public Types

using element_type = T
 
using value_type = typename std::remove_cv< T >::type
 
using difference_type = ptrdiff_t
 
using pointer = T *
 
using reference = T &
 
using const_pointer = const T *
 
using const_reference = const T &
 

Public Member Functions

constexpr Span ()=default
 
constexpr Span (pointer ptr, size_t cnt)
 
template<size_t N>
constexpr Span (const T(&arr)[N])
 
constexpr pointer begin () const noexcept
 
constexpr pointer end () const noexcept
 
constexpr element_type front () const noexcept
 
constexpr element_type back () const noexcept
 
constexpr reference operator[] (size_t idx) noexcept
 
constexpr const_reference operator[] (size_t idx) const noexcept
 
constexpr pointer data () const noexcept
 
constexpr size_t size () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr Span< T, DYNAMIC_EXTENT > subspan (size_t index, size_t length) const
 
constexpr Span< T, DYNAMIC_EXTENT > subspan (size_t index) const
 
template<size_t Offset, size_t Count = DYNAMIC_EXTENT>
constexpr Span< T, Count > subspan () const
 

Member Typedef Documentation

◆ const_pointer

template<class T >
using microstrain::Span< T, DYNAMIC_EXTENT >::const_pointer = const T*

◆ const_reference

template<class T >
using microstrain::Span< T, DYNAMIC_EXTENT >::const_reference = const T&

◆ difference_type

template<class T >
using microstrain::Span< T, DYNAMIC_EXTENT >::difference_type = ptrdiff_t

◆ element_type

template<class T >
using microstrain::Span< T, DYNAMIC_EXTENT >::element_type = T

◆ pointer

template<class T >
using microstrain::Span< T, DYNAMIC_EXTENT >::pointer = T*

◆ reference

template<class T >
using microstrain::Span< T, DYNAMIC_EXTENT >::reference = T&

◆ value_type

template<class T >
using microstrain::Span< T, DYNAMIC_EXTENT >::value_type = typename std::remove_cv<T>::type

Constructor & Destructor Documentation

◆ Span() [1/3]

template<class T >
constexpr microstrain::Span< T, DYNAMIC_EXTENT >::Span ( )
constexprdefault

◆ Span() [2/3]

template<class T >
constexpr microstrain::Span< T, DYNAMIC_EXTENT >::Span ( pointer  ptr,
size_t  cnt 
)
inlineconstexpr

◆ Span() [3/3]

template<class T >
template<size_t N>
constexpr microstrain::Span< T, DYNAMIC_EXTENT >::Span ( const T(&)  arr[N])
inlineconstexpr

Member Function Documentation

◆ back()

template<class T >
constexpr element_type microstrain::Span< T, DYNAMIC_EXTENT >::back ( ) const
inlineconstexprnoexcept

◆ begin()

template<class T >
constexpr pointer microstrain::Span< T, DYNAMIC_EXTENT >::begin ( ) const
inlineconstexprnoexcept

◆ data()

template<class T >
constexpr pointer microstrain::Span< T, DYNAMIC_EXTENT >::data ( ) const
inlineconstexprnoexcept

◆ empty()

template<class T >
constexpr bool microstrain::Span< T, DYNAMIC_EXTENT >::empty ( ) const
inlineconstexprnoexcept

◆ end()

template<class T >
constexpr pointer microstrain::Span< T, DYNAMIC_EXTENT >::end ( ) const
inlineconstexprnoexcept

◆ front()

template<class T >
constexpr element_type microstrain::Span< T, DYNAMIC_EXTENT >::front ( ) const
inlineconstexprnoexcept

◆ operator[]() [1/2]

template<class T >
constexpr const_reference microstrain::Span< T, DYNAMIC_EXTENT >::operator[] ( size_t  idx) const
inlineconstexprnoexcept

◆ operator[]() [2/2]

template<class T >
constexpr reference microstrain::Span< T, DYNAMIC_EXTENT >::operator[] ( size_t  idx)
inlineconstexprnoexcept

◆ size()

template<class T >
constexpr size_t microstrain::Span< T, DYNAMIC_EXTENT >::size ( ) const
inlineconstexprnoexcept

◆ subspan() [1/3]

template<class T >
template<size_t Offset, size_t Count = DYNAMIC_EXTENT>
constexpr Span<T, Count> microstrain::Span< T, DYNAMIC_EXTENT >::subspan ( ) const
inlineconstexpr

◆ subspan() [2/3]

template<class T >
constexpr Span<T, DYNAMIC_EXTENT> microstrain::Span< T, DYNAMIC_EXTENT >::subspan ( size_t  index) const
inlineconstexpr

◆ subspan() [3/3]

template<class T >
constexpr Span<T, DYNAMIC_EXTENT> microstrain::Span< T, DYNAMIC_EXTENT >::subspan ( size_t  index,
size_t  length 
) const
inlineconstexpr

The documentation for this struct was generated from the following file: