std::ranges::stride_view<V>::stride
From cppreference.com
< cpp | ranges | stride view
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Ranges library
(C++23)(C++23)
(C++26)(C++26)
(C++23)(C++23)
(C++26)(C++26)
(C++26)(C++26)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
std::ranges::stride_view
stride_view::stride
(C++26)
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_
;.
[edit] Return value
The stride value.
[edit] Example
Run this code
#include <ranges> int main() { constexpr auto view = std::views::iota (1337) | std::views::stride (42); static_assert(view.stride() == 42); }