itertools::slice

#include <itertools.hpp>

Synopsis

template<typename T>
details::sliced<T> slice (T && range, std::ptrdiff_t start_idx, std::ptrdiff_t end_idx)

Lazy-slice a range. This function returns itself a slice of the initial range

Parameters

  • range The range to slice
  • start_idx The index to start the slice at
  • end_idx The index one past the end of the sliced range