14#ifndef RANGES_V3_ACTION_STRIDE_HPP
15#define RANGES_V3_ACTION_STRIDE_HPP
25#include <range/v3/utility/static_const.hpp>
27#include <range/v3/detail/prologue.hpp>
38 requires detail::integer_like_<D>)
39 constexpr auto operator()(D step)
const
44 template(
typename Rng,
typename D = range_difference_t<Rng>)(
48 Rng operator()(Rng && rng, range_difference_t<Rng>
const step)
const
51 using S = sentinel_t<Rng>;
52 RANGES_EXPECT(0 < step);
55 I
first = ranges::begin(rng);
56 S
const last = ranges::end(rng);
59 for(I i = ranges::next(++
first, step - 1, last); i != last;
60 advance(i, step, last), ++
first)
62 *
first = iter_move(i);
65 ranges::actions::erase(rng,
first, last);
67 return static_cast<Rng &&
>(rng);
77#include <range/v3/detail/epilogue.hpp>
The erasable_range concept.
The forward_range concept.
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector > >, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
defer< bind_back, Fn, Ts... > bind_back
Definition: meta.hpp:994
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251
Definition: stride.hpp:36