13template <
typename T,
size_t N>
15 typename std::span<T>::size_type n = 1) {
16 assert(
in.size() >= n &&
"Dropping more elements than exist");
17 return in.subspan(n,
in.size() - n);
21template <
typename T,
size_t N>
23 typename std::span<T>::size_type n = 1) {
24 assert(
in.size() >= n &&
"Dropping more elements than exist");
25 return in.subspan(0,
in.size() - n);
33template <
typename T,
size_t N>
35 typename std::span<T>::size_type n = 1) {
36 auto length =
in.size();
48template <
typename T,
size_t N>
50 typename std::span<T>::size_type n = 1) {
51 auto length =
in.size();
constexpr auto in(type t, int set) -> bool
Definition: core.h:611
Definition: ntcore_cpp.h:26
constexpr std::span< T > drop_back(std::span< T, N > in, typename std::span< T >::size_type n=1)
Drop the last N elements of the array.
Definition: SpanExtras.h:22
constexpr std::span< T > drop_front(std::span< T, N > in, typename std::span< T >::size_type n=1)
Drop the first N elements of the array.
Definition: SpanExtras.h:14
constexpr std::span< T > 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.
Definition: SpanExtras.h:34
constexpr std::span< T > 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.
Definition: SpanExtras.h:49