itertools::slice

#include <itertools.hpp>

Synopsis

template<typename R>
sliced<R> slice (R && rg, std::ptrdiff_t start_idx, std::ptrdiff_t end_idx)

Template parameters

  • R Range type.

Parameters

  • rg Range to be sliced.

  • start_idx Index where the slice starts.

  • end_idx Index of the first element past the end of the sliced range (excluded).

Returns

A itertools::sliced range.