std::ranges::stride_view<V>::stride - cppreference.com
| ||||||||||||||||||||||
| Range primitives | ||||
(C++23)(C++23) | ||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | ||||||||||||||
| ||||||||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||
| Helper items | ||||||||||||
(until C++23) (C++23) | ||||||||||||
constexpr ranges::range_difference_t<_Vp> stride() const noexcept; |
(since C++23) | |
Returns a copy of the underlying stride object stride_. Equivalent to return stride_;.
Return value
The stride value.
Example
Run this code
#include <ranges> int main() { constexpr auto view = std::views::iota(1337) | std::views::stride(42); static_assert(view.stride() == 42); }