tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Array< T, N > Struct Template Reference

Fixed-size array container for embedded systems. More...

#include <array.h>

Inheritance diagram for Array< T, N >:
Inheritance graph
[legend]

Public Member Functions

FORCE_INLINE constexpr T & operator[] (my_size_t i) noexcept
 
FORCE_INLINE constexpr const T & operator[] (my_size_t i) const noexcept
 
constexpr T & at (my_size_t i)
 
constexpr const T & at (my_size_t i) const
 
FORCE_INLINE constexpr T & front () noexcept
 
FORCE_INLINE constexpr const T & front () const noexcept
 
FORCE_INLINE constexpr T & back () noexcept
 
FORCE_INLINE constexpr const T & back () const noexcept
 
FORCE_INLINE constexpr T * begin () noexcept
 
FORCE_INLINE constexpr const T * begin () const noexcept
 
FORCE_INLINE constexpr T * end () noexcept
 
FORCE_INLINE constexpr const T * end () const noexcept
 
constexpr void fill (const T &value) noexcept
 
constexpr void swap (Array &other) noexcept
 

Static Public Member Functions

static FORCE_INLINE constexpr my_size_t size () noexcept
 
static FORCE_INLINE constexpr bool empty () noexcept
 

Public Attributes

data [N]
 

Detailed Description

template<typename T, my_size_t N>
struct Array< T, N >

Fixed-size array container for embedded systems.

Template Parameters
TElement type
NNumber of elements (compile-time constant)

Drop-in replacement for std::array without STL dependency. All operations are constexpr for compile-time use.

Usage: constexpr Array<int, 3> arr = {1, 2, 3}; static_assert(arr[0] == 1); static_assert(arr.size() == 3);

Member Function Documentation

◆ at() [1/2]

template<typename T , my_size_t N>
constexpr T & Array< T, N >::at ( my_size_t  i)
inlineconstexpr
Here is the call graph for this function:

◆ at() [2/2]

template<typename T , my_size_t N>
constexpr const T & Array< T, N >::at ( my_size_t  i) const
inlineconstexpr
Here is the call graph for this function:

◆ back() [1/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr const T & Array< T, N >::back ( ) const
inlineconstexprnoexcept

◆ back() [2/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr T & Array< T, N >::back ( )
inlineconstexprnoexcept

◆ begin() [1/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr const T * Array< T, N >::begin ( ) const
inlineconstexprnoexcept

◆ begin() [2/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr T * Array< T, N >::begin ( )
inlineconstexprnoexcept

◆ empty()

template<typename T , my_size_t N>
static FORCE_INLINE constexpr bool Array< T, N >::empty ( )
inlinestaticconstexprnoexcept

◆ end() [1/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr const T * Array< T, N >::end ( ) const
inlineconstexprnoexcept

◆ end() [2/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr T * Array< T, N >::end ( )
inlineconstexprnoexcept

◆ fill()

template<typename T , my_size_t N>
constexpr void Array< T, N >::fill ( const T &  value)
inlineconstexprnoexcept

◆ front() [1/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr const T & Array< T, N >::front ( ) const
inlineconstexprnoexcept

◆ front() [2/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr T & Array< T, N >::front ( )
inlineconstexprnoexcept

◆ operator[]() [1/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr const T & Array< T, N >::operator[] ( my_size_t  i) const
inlineconstexprnoexcept

◆ operator[]() [2/2]

template<typename T , my_size_t N>
FORCE_INLINE constexpr T & Array< T, N >::operator[] ( my_size_t  i)
inlineconstexprnoexcept

◆ size()

template<typename T , my_size_t N>
static FORCE_INLINE constexpr my_size_t Array< T, N >::size ( )
inlinestaticconstexprnoexcept

◆ swap()

template<typename T , my_size_t N>
constexpr void Array< T, N >::swap ( Array< T, N > &  other)
inlineconstexprnoexcept

Member Data Documentation

◆ data

template<typename T , my_size_t N>
T Array< T, N >::data[N]

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