Kanzi  3.9.4
Kanzi Engine API
kanzi::span< T > Class Template Reference

#include <kanzi/core/cpp/span.hpp>

Public Types

using const_iterator = const_pointer
 
using const_pointer = const T *
 
using const_reference = const T &
 
using difference_type = ptrdiff_t
 
using element_type = T
 
using iterator = pointer
 
using pointer = T *
 
using reference = T &
 
using size_type = size_t
 
using value_type = std::remove_cv_t< T >
 

Public Member Functions

constexpr reference back () const
 
constexpr iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr pointer data () const noexcept
 
KZ_NO_DISCARD constexpr bool empty () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr span< element_typefirst (size_type count) const
 
constexpr reference front () const
 
constexpr span< element_typelast (size_type count) const
 
spanoperator= (const span &) noexcept=default
 
constexpr reference operator[] (size_type i) const
 
constexpr size_type size () const noexcept
 
constexpr size_type size_bytes () const noexcept
 
constexpr span () noexcept=default
 
constexpr span (pointer ptr, size_type count)
 
constexpr span (pointer first, pointer last)
 
template<size_t N>
constexpr span (T(&data)[N]) noexcept
 
template<size_t N>
constexpr span (array< T, N > &arr)
 
template<size_t N>
constexpr span (const array< T, N > &arr)
 
constexpr span (const span &) noexcept=default
 
constexpr span< Tsubspan (size_t offset, size_t count=numeric_limits< size_t >::max()) const
 

Member Typedef Documentation

◆ element_type

template<typename T>
using kanzi::span< T >::element_type = T

◆ value_type

template<typename T>
using kanzi::span< T >::value_type = std::remove_cv_t<T>

◆ size_type

template<typename T>
using kanzi::span< T >::size_type = size_t

◆ difference_type

template<typename T>
using kanzi::span< T >::difference_type = ptrdiff_t

◆ pointer

template<typename T>
using kanzi::span< T >::pointer = T*

◆ const_pointer

template<typename T>
using kanzi::span< T >::const_pointer = const T*

◆ reference

template<typename T>
using kanzi::span< T >::reference = T&

◆ const_reference

template<typename T>
using kanzi::span< T >::const_reference = const T&

◆ iterator

template<typename T>
using kanzi::span< T >::iterator = pointer

◆ const_iterator

template<typename T>
using kanzi::span< T >::const_iterator = const_pointer

Constructor & Destructor Documentation

◆ span() [1/7]

template<typename T>
constexpr kanzi::span< T >::span ( )
defaultnoexcept

◆ span() [2/7]

template<typename T>
constexpr kanzi::span< T >::span ( pointer  ptr,
size_type  count 
)
inline

◆ span() [3/7]

template<typename T>
constexpr kanzi::span< T >::span ( pointer  first,
pointer  last 
)
inline

◆ span() [4/7]

template<typename T>
template<size_t N>
constexpr kanzi::span< T >::span ( T(&)  data[N])
inlinenoexcept

◆ span() [5/7]

template<typename T>
template<size_t N>
constexpr kanzi::span< T >::span ( array< T, N > &  arr)
inline

◆ span() [6/7]

template<typename T>
template<size_t N>
constexpr kanzi::span< T >::span ( const array< T, N > &  arr)
inline

◆ span() [7/7]

template<typename T>
constexpr kanzi::span< T >::span ( const span< T > &  )
defaultnoexcept

Member Function Documentation

◆ operator=()

template<typename T>
span& kanzi::span< T >::operator= ( const span< T > &  )
defaultnoexcept

◆ begin()

template<typename T>
constexpr iterator kanzi::span< T >::begin ( ) const
inlinenoexcept

◆ cbegin()

template<typename T>
constexpr const_iterator kanzi::span< T >::cbegin ( ) const
inlinenoexcept

◆ end()

template<typename T>
constexpr iterator kanzi::span< T >::end ( ) const
inlinenoexcept

◆ cend()

template<typename T>
constexpr const_iterator kanzi::span< T >::cend ( ) const
inlinenoexcept

◆ front()

template<typename T>
constexpr reference kanzi::span< T >::front ( ) const
inline

◆ back()

template<typename T>
constexpr reference kanzi::span< T >::back ( ) const
inline

◆ operator[]()

template<typename T>
constexpr reference kanzi::span< T >::operator[] ( size_type  i) const
inline

◆ data()

template<typename T>
constexpr pointer kanzi::span< T >::data ( ) const
inlinenoexcept

◆ size()

template<typename T>
constexpr size_type kanzi::span< T >::size ( ) const
inlinenoexcept

◆ size_bytes()

template<typename T>
constexpr size_type kanzi::span< T >::size_bytes ( ) const
inlinenoexcept

◆ empty()

template<typename T>
KZ_NO_DISCARD constexpr bool kanzi::span< T >::empty ( ) const
inlinenoexcept

◆ first()

template<typename T>
constexpr span<element_type> kanzi::span< T >::first ( size_type  count) const
inline

◆ last()

template<typename T>
constexpr span<element_type> kanzi::span< T >::last ( size_type  count) const
inline

◆ subspan()

template<typename T>
constexpr span<T> kanzi::span< T >::subspan ( size_t  offset,
size_t  count = numeric_limits<size_t>::max() 
) const
inline

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