Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::array< T, Size, enable_if_t< Size==0 > > Struct Template Referencefinal

Array class specialization for zero-sized arrays. More...

#include <array.hpp>

Public Member Functions

 array ()
 Default constructor.
 array (const T *(&elems))
 Construct from a pointer (no-op).
operator[] (size_t index)
 Element access (aborts, array is empty).
array_iterator< T > begin ()
 Return an iterator to the beginning (empty range).
array_iterator< T > end ()
 Return an iterator to the end (empty range).
size_t size ()
 Return the number of elements (always 0).
T * ptr ()
 Return a null pointer (no data).

Detailed Description

template<typename T, size_t Size>
struct flecs::array< T, Size, enable_if_t< Size==0 > >

Array class specialization for zero-sized arrays.

Definition at line 113 of file array.hpp.

Constructor & Destructor Documentation

◆ array() [1/2]

template<typename T, size_t Size>
flecs::array< T, Size, enable_if_t< Size==0 > >::array ( )
inline

Default constructor.

Definition at line 115 of file array.hpp.

◆ array() [2/2]

template<typename T, size_t Size>
flecs::array< T, Size, enable_if_t< Size==0 > >::array ( const T *& elems)
inline

Construct from a pointer (no-op).

Definition at line 117 of file array.hpp.

Member Function Documentation

◆ begin()

template<typename T, size_t Size>
array_iterator< T > flecs::array< T, Size, enable_if_t< Size==0 > >::begin ( )
inline

Return an iterator to the beginning (empty range).

Definition at line 121 of file array.hpp.

◆ end()

template<typename T, size_t Size>
array_iterator< T > flecs::array< T, Size, enable_if_t< Size==0 > >::end ( )
inline

Return an iterator to the end (empty range).

Definition at line 123 of file array.hpp.

◆ operator[]()

template<typename T, size_t Size>
T flecs::array< T, Size, enable_if_t< Size==0 > >::operator[] ( size_t index)
inline

Element access (aborts, array is empty).

Definition at line 119 of file array.hpp.

◆ ptr()

template<typename T, size_t Size>
T * flecs::array< T, Size, enable_if_t< Size==0 > >::ptr ( )
inline

Return a null pointer (no data).

Definition at line 131 of file array.hpp.

◆ size()

template<typename T, size_t Size>
size_t flecs::array< T, Size, enable_if_t< Size==0 > >::size ( )
inline

Return the number of elements (always 0).

Definition at line 126 of file array.hpp.


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