WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
SpanExtras.hpp File Reference
#include <cassert>
#include <span>

Go to the source code of this file.

Namespaces

namespace  wpi
namespace  wpi::util

Functions

template<typename T, size_t N>
constexpr std::span< T > wpi::util::drop_front (std::span< T, N > in, typename std::span< T >::size_type n=1)
 Drop the first N elements of the array.
template<typename T, size_t N>
constexpr std::span< T > wpi::util::drop_back (std::span< T, N > in, typename std::span< T >::size_type n=1)
 Drop the last N elements of the array.
template<typename T, size_t N>
constexpr std::span< T > wpi::util::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.
template<typename T, size_t N>
constexpr std::span< T > wpi::util::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.