std::ranges::stride_view::begin - cppreference.com (original) (raw)

constexpr auto begin() requires (!__simple_view<V>); (1) (since C++23)
constexpr auto begin() const requires ranges::range<const V>; (2) (since C++23)

Returns an iterator to the first element of the stride_view.

  1. Equivalent to return iterator<false>(this, ranges::begin(base_));.

  2. Equivalent to return iterator<true>(this, ranges::begin(base_));.

Overload (1) does not participate in overload resolution if V is a simple view (that is, if V and const V are views with the same iterator and sentinel types).

[edit] Parameters

(none)

[edit] Return value

Iterator to the first element of the view.

[edit] Example

[edit] See also

| | returns an iterator or a sentinel to the end (public member function) [edit] | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |