25template <
typename T,
size_t N>
26class array :
public std::array<T, N> {
30 template <std::convertible_to<T>... Ts>
31 requires(1 +
sizeof...(Ts) == N)
33 : std::array<T, N>{std::forward<T>(
arg), std::forward<Ts>(args)...} {}
40 constexpr array(
const std::array<T, N>& rhs) {
41 *
static_cast<std::array<T, N>*
>(
this) = rhs;
45 *
static_cast<std::array<T, N>*
>(
this) = rhs;
49 constexpr array(std::array<T, N>&& rhs) {
50 *
static_cast<std::array<T, N>*
>(
this) = rhs;
54 *
static_cast<std::array<T, N>*
>(
this) = rhs;
59template <
typename T, std::convertible_to<T>... Ts>
64template <
size_t I,
typename T,
size_t N>
67 return std::get<I>(
static_cast<std::array<T, N>
>(arr));
70template <
size_t I,
typename T,
size_t N>
73 return std::move(std::get<I>(arr));
76template <
size_t I,
typename T,
size_t N>
79 return std::get<I>(
static_cast<std::array<T, N>
>(arr));
82template <
size_t I,
typename T,
size_t N>
85 return std::move(std::get<I>(arr));
91template <
typename T,
size_t N>
92struct tuple_size<
wpi::array<T, N>> :
public integral_constant<size_t, N> {};
95template <
size_t I,
typename T,
size_t N>
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Returns a named argument to be used in a formatting function.
Definition base.h:2831
This class is a wrapper around std::array that does compile time size checking.
Definition array.h:26
constexpr array & operator=(std::array< T, N > &&rhs)
Definition array.h:53
constexpr array & operator=(const std::array< T, N > &rhs)
Definition array.h:44
constexpr array & operator=(const array< T, N > &)=default
constexpr array(const std::array< T, N > &rhs)
Definition array.h:40
constexpr array(std::array< T, N > &&rhs)
Definition array.h:49
constexpr array(const array< T, N > &)=default
constexpr array(array< T, N > &&)=default
constexpr array & operator=(array< T, N > &&)=default
constexpr array(empty_array_t)
Definition array.h:28
constexpr array(T arg, Ts &&... args)
Definition array.h:32
constexpr T & get(wpi::array< T, N > &arr) noexcept
Definition array.h:66
Definition PointerIntPair.h:280
Definition ntcore_cpp.h:26
array(T, Ts...) -> array< T, 1+sizeof...(Ts)>
constexpr empty_array_t empty_array
Definition array.h:16
T type
Definition array.h:98