WPILibC++ 2024.3.2
wpi::array< T, N > Class Template Reference

This class is a wrapper around std::array that does compile time size checking. More...

#include <wpi/array.h>

Inheritance diagram for wpi::array< T, N >:

Public Member Functions

constexpr array (empty_array_t)
 
template<std::convertible_to< T >... Ts>
requires (1 + sizeof...(Ts) == N)
constexpr array (T arg, Ts &&... args)
 
constexpr array (const array< T, N > &)=default
 
constexpr arrayoperator= (const array< T, N > &)=default
 
constexpr array (array< T, N > &&)=default
 
constexpr arrayoperator= (array< T, N > &&)=default
 
constexpr array (const std::array< T, N > &rhs)
 
constexpr arrayoperator= (const std::array< T, N > &rhs)
 
constexpr array (std::array< T, N > &&rhs)
 
constexpr arrayoperator= (std::array< T, N > &&rhs)
 

Detailed Description

template<typename T, size_t N>
class wpi::array< T, N >

This class is a wrapper around std::array that does compile time size checking.

std::array's implicit constructor can result in uninitialized elements if the number of arguments doesn't match the std::array size.

Constructor & Destructor Documentation

◆ array() [1/6]

template<typename T , size_t N>
constexpr wpi::array< T, N >::array ( empty_array_t  )
inlineexplicitconstexpr

◆ array() [2/6]

template<typename T , size_t N>
template<std::convertible_to< T >... Ts>
requires (1 + sizeof...(Ts) == N)
constexpr wpi::array< T, N >::array ( arg,
Ts &&...  args 
)
inlineconstexpr

◆ array() [3/6]

template<typename T , size_t N>
constexpr wpi::array< T, N >::array ( const array< T, N > &  )
constexprdefault

◆ array() [4/6]

template<typename T , size_t N>
constexpr wpi::array< T, N >::array ( array< T, N > &&  )
constexprdefault

◆ array() [5/6]

template<typename T , size_t N>
constexpr wpi::array< T, N >::array ( const std::array< T, N > &  rhs)
inlineconstexpr

◆ array() [6/6]

template<typename T , size_t N>
constexpr wpi::array< T, N >::array ( std::array< T, N > &&  rhs)
inlineconstexpr

Member Function Documentation

◆ operator=() [1/4]

template<typename T , size_t N>
constexpr array & wpi::array< T, N >::operator= ( array< T, N > &&  )
constexprdefault

◆ operator=() [2/4]

template<typename T , size_t N>
constexpr array & wpi::array< T, N >::operator= ( const array< T, N > &  )
constexprdefault

◆ operator=() [3/4]

template<typename T , size_t N>
constexpr array & wpi::array< T, N >::operator= ( const std::array< T, N > &  rhs)
inlineconstexpr

◆ operator=() [4/4]

template<typename T , size_t N>
constexpr array & wpi::array< T, N >::operator= ( std::array< T, N > &&  rhs)
inlineconstexpr

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