WPILibC++ 2024.3.2
SpanExtras.h File Reference
#include <cassert>
#include <span>

Go to the source code of this file.

Namespaces

namespace  wpi
 

Functions

template<typename T , size_t N>
constexpr std::span< T > wpi::drop_front (std::span< T, N > in, typename std::span< T >::size_type n=1)
 Drop the first N elements of the array. More...
 
template<typename T , size_t N>
constexpr std::span< T > wpi::drop_back (std::span< T, N > in, typename std::span< T >::size_type n=1)
 Drop the last N elements of the array. More...
 
template<typename T , size_t N>
constexpr std::span< T > wpi::take_front (std::span< T, N > in, typename std::span< T >::size_type n=1)
 Returns a span equal to in but with only the first n elements remaining. More...
 
template<typename T , size_t N>
constexpr std::span< T > wpi::take_back (std::span< T, N > in, typename std::span< T >::size_type n=1)
 Returns a span equal to in but with only the last n elements remaining. More...