SPH
Classes | Typedefs | Functions | Variables
StaticArray.h File Reference
#include "objects/containers/ArrayView.h"
#include "objects/wrappers/AlignedStorage.h"
#include <initializer_list>

Go to the source code of this file.

Classes

struct  EmptyArray
 
class  StaticArray< T, N, TCounter >
 Array with fixed number of allocated elements. More...
 
class  ConstexprArray< T, N >
 Container similar to StaticArray, but with constexpr constructors and getters. More...
 

Typedefs

template<typename T >
using Pair = StaticArray< T, 2 >
 Alias for array holding two elements of the same type. More...
 

Functions

template<typename T0 , typename... TArgs>
StaticArray< T0, sizeof...(TArgs)+1 > makeStatic (T0 &&t0, TArgs &&... rest)
 Creates a static array from a list of parameters. More...
 
template<typename T0 , typename... TArgs>
StaticArray< T0 &, sizeof...(TArgs)+1 > tie (T0 &t0, TArgs &... rest)
 Creates a static array from a list of l-value references. More...
 

Variables

NAMESPACE_SPH_BEGIN const struct EmptyArray EMPTY_ARRAY
 

Typedef Documentation

◆ Pair

template<typename T >
using Pair = StaticArray<T, 2>

Alias for array holding two elements of the same type.

Definition at line 287 of file StaticArray.h.

Function Documentation

◆ makeStatic()

template<typename T0 , typename... TArgs>
StaticArray<T0, sizeof...(TArgs) + 1> makeStatic ( T0 &&  t0,
TArgs &&...  rest 
)

Creates a static array from a list of parameters.

All parameters must have the same type. Both the allocated size of the array and the number of constructed elements equal to the number of parameters.

Definition at line 272 of file StaticArray.h.

◆ tie()

template<typename T0 , typename... TArgs>
StaticArray<T0&, sizeof...(TArgs) + 1> tie ( T0 &  t0,
TArgs &...  rest 
)

Creates a static array from a list of l-value references.

All parameters must have the same type. Both the allocated size of the array and the number of constructed elements equal to the number of parameters.

Definition at line 281 of file StaticArray.h.

Variable Documentation

◆ EMPTY_ARRAY

NAMESPACE_SPH_BEGIN const struct EmptyArray EMPTY_ARRAY