FormIt C++ API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
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
 Constructor.
 
 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
 begin() function.
 
constexpr const TIter cbegin () const noexcept
 cbegin() function.
 
constexpr TIter end () noexcept
 end() function.
 
constexpr const TIter cend () const noexcept
 cend() function.
 
constexpr bool empty () const noexcept
 empty() function.
 
constexpr size_t size () const noexcept
 size() function.
 
constexpr TIter data () noexcept
 data() function.
 
constexpr T & operator[] (size_t i) noexcept
 
constexpr const T & operator[] (size_t i) const noexcept
 

Member Typedef Documentation

◆ TIter

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

Constructor & Destructor Documentation

◆ Span() [1/5]

template<typename T >
FormIt::Utils::Span< T >::Span ( )
default

Constructor.

◆ Span() [2/5]

template<typename T >
FormIt::Utils::Span< T >::Span ( const Span< T > &  r)
default

◆ Span() [3/5]

template<typename T >
FormIt::Utils::Span< T >::Span ( Span< T > &&  r)
default

◆ Span() [4/5]

template<typename T >
template<typename Container >
FormIt::Utils::Span< T >::Span ( Container &  d)
inline

◆ Span() [5/5]

template<typename T >
FormIt::Utils::Span< T >::Span ( TIter  b,
TIter  e 
)
inlinenoexcept

Member Function Documentation

◆ begin()

template<typename T >
constexpr TIter FormIt::Utils::Span< T >::begin ( )
inlineconstexprnoexcept

begin() function.

◆ cbegin()

template<typename T >
constexpr const TIter FormIt::Utils::Span< T >::cbegin ( ) const
inlineconstexprnoexcept

cbegin() function.

◆ cend()

template<typename T >
constexpr const TIter FormIt::Utils::Span< T >::cend ( ) const
inlineconstexprnoexcept

cend() function.

◆ data()

template<typename T >
constexpr TIter FormIt::Utils::Span< T >::data ( )
inlineconstexprnoexcept

data() function.

◆ empty()

template<typename T >
constexpr bool FormIt::Utils::Span< T >::empty ( ) const
inlineconstexprnoexcept

empty() function.

◆ end()

template<typename T >
constexpr TIter FormIt::Utils::Span< T >::end ( )
inlineconstexprnoexcept

end() function.

◆ operator[]() [1/2]

template<typename T >
constexpr const T & FormIt::Utils::Span< T >::operator[] ( size_t  i) const
inlineconstexprnoexcept

◆ operator[]() [2/2]

template<typename T >
constexpr T & FormIt::Utils::Span< T >::operator[] ( size_t  i)
inlineconstexprnoexcept

◆ size()

template<typename T >
constexpr size_t FormIt::Utils::Span< T >::size ( ) const
inlineconstexprnoexcept

size() function.


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