FormIt C++ API  v23.0.0 (2023.0.0)
FormIt::Utils::Span< T > Struct Template Reference

Description

template<typename T>
struct FormIt::Utils::Span< T >

Provides a "view" into a container/array.

Simplified from std::span TODO change this to an alias to std::span if we move to C++20

#include <FormItCoreTypes.h>

Public Types

using TIter = T *
 

Public Member Functions

 Span ()=default
 
 Span (const Span &r)=default
 
 Span (Span &&r)=default
 
template<typename Container >
 Span (Container &d)
 
 Span (TIter b, TIter e) noexcept
 
constexpr TIter begin () noexcept
 
constexpr const TIter cbegin () const noexcept
 
constexpr TIter end () noexcept
 
constexpr const TIter cend () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr size_t size () const noexcept
 
constexpr TIter data () noexcept
 
constexpr T & operator[] (size_t i) noexcept
 
constexpr const T & operator[] (size_t i) const noexcept
 

Member Typedef Documentation

template<typename T >
using FormIt::Utils::Span< T >::TIter = T*

Constructor & Destructor Documentation

template<typename T >
FormIt::Utils::Span< T >::Span ( )
default
template<typename T >
FormIt::Utils::Span< T >::Span ( const Span< T > &  r)
default
template<typename T >
FormIt::Utils::Span< T >::Span ( Span< T > &&  r)
default
template<typename T >
template<typename Container >
FormIt::Utils::Span< T >::Span ( Container &  d)
inline
template<typename T >
FormIt::Utils::Span< T >::Span ( TIter  b,
TIter  e 
)
inlinenoexcept

Member Function Documentation

template<typename T >
constexpr TIter FormIt::Utils::Span< T >::begin ( )
inlinenoexcept
template<typename T >
constexpr const TIter FormIt::Utils::Span< T >::cbegin ( ) const
inlinenoexcept
template<typename T >
constexpr const TIter FormIt::Utils::Span< T >::cend ( ) const
inlinenoexcept
template<typename T >
constexpr TIter FormIt::Utils::Span< T >::data ( )
inlinenoexcept
template<typename T >
constexpr bool FormIt::Utils::Span< T >::empty ( ) const
inlinenoexcept
template<typename T >
constexpr TIter FormIt::Utils::Span< T >::end ( )
inlinenoexcept
template<typename T >
constexpr T& FormIt::Utils::Span< T >::operator[] ( size_t  i)
inlinenoexcept
template<typename T >
constexpr const T& FormIt::Utils::Span< T >::operator[] ( size_t  i) const
inlinenoexcept
template<typename T >
constexpr size_t FormIt::Utils::Span< T >::size ( ) const
inlinenoexcept

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