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_;.
(none).
The stride value.
A link to test: Compiler Explorer.
#include <ranges>
int main()
{
constexpr auto view = std::views::iota(1337)
| std::views::stride(42);
static_assert(view.stride() == 42);
}
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/ranges/stride_view/stride