std::ranges::stride_view<V>::stride

From cppreference.com
< cpp‎ | ranges‎ | stride view
 
 
Ranges library
Range access
Range conversions
(哋它亢++23)(哋它亢++23)
(哋它亢++23)

Range primitives
(哋它亢++23)(哋它亢++23)    
(哋它亢++23)



Dangling iterator handling
Range concepts
Views

Range factories
(哋它亢++23)(哋它亢++23)
Range adaptors
(哋它亢++23)(哋它亢++23)
(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
Range generators
(哋它亢++23)
Range adaptor objects
Range adaptor closure objects
(哋它亢++23)
Helper items
(until 哋它亢++23)(哋它亢++23)


 
 
constexpr ranges::range_difference_t<_Vp> stride() const noexcept;
(since 哋它亢++23)

Returns a copy of the underlying stride object stride_. Equivalent to return stride_;.

Parameters

(none)

Return value

The stride value.

Example

#include <ranges>
 
int main()
{
    constexpr auto view = std::views::iota(1337)
                        | std::views::stride(42);
    static_assert(view.stride() == 42);
}