#include <itertools/slice.hpp>
template<typename R>
struct itertools::sliced< R >
Represents a sliced range.
See itertools::slice(R &&, std::ptrdiff_t, std::ptrdiff_t) for more details.
- Template Parameters
-
Definition at line 42 of file slice.hpp.
|
using | const_iterator = decltype(std::cbegin(rg)) |
| Const iterator type of the sliced range.
|
|
using | iterator = decltype(std::begin(rg)) |
| Iterator type of the sliced range.
|
|
|
std::ptrdiff_t | end_idx |
| Index at which the sliced range ends.
|
|
R | rg |
| Original range.
|
|
std::ptrdiff_t | start_idx |
| Index at which the sliced range starts.
|
|
◆ begin()
Beginning of the sliced range.
- Returns
- Iterator to the beginning of the sliced range.
Definition at line 74 of file slice.hpp.
◆ end()
End of the sliced range.
- Returns
- Iterator to the end of the sliced range.
Definition at line 86 of file slice.hpp.
◆ size()
Helper function to calculate the size of the sliced range.
- Returns
- Number of elements in the slice.
Definition at line 65 of file slice.hpp.
The documentation for this struct was generated from the following file: