C++ SDK Documentation  23.4.0
inlining_array< T, MAX_STACK_ELEMS > Struct Template Reference
Collaboration diagram for inlining_array< T, MAX_STACK_ELEMS >:
Collaboration graph

Public Member Functions

template<typename... Args>
 inlining_array (size_t n_elements, Args &&...args)
 
 inlining_array (const inlining_array &)=delete
 
 inlining_array (inlining_array &&)=delete
 
T & at (size_t idx)
 
T * begin ()
 
T * end ()
 
size_t getNumElements () const
 
T * getPtr ()
 
size_t getSize () const
 
 operator T * ()
 
T * operator& () const =delete
 
T * operator() ()
 
T * operator+ (size_t i)
 
T * operator-> ()
 
inlining_arrayoperator= (const inlining_array &)=delete
 
inlining_arrayoperator= (inlining_array &&)=delete
 
T & operator[] (size_t idx)
 

Detailed Description

template<class T, size_t MAX_STACK_ELEMS = 8>
struct inlining_array< T, MAX_STACK_ELEMS >

Heap-allocated array that optimizes for small sizes by storing locally, such as on the stack. Replacement for variable-length stack arrays, but with bounded stack usage, and larger items allocated on the heap. If element count is less than template parameter, use internal buffer, otherwise use malloc/free