Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::index_fn Struct Reference

Unchecked indexed range access. More...

#include <range/v3/range/operations.hpp>

Public Member Functions

template<typename Rng , typename Int >
requires random_access_range<Rng> && integral<Int> && borrowed_range<Rng>
constexpr range_reference_t< Rng > operator() (Rng &&rng, Int n) const
 

Detailed Description

Unchecked indexed range access.

Member Function Documentation

◆ operator()()

template<typename Rng , typename Int >
requires random_access_range<Rng> && integral<Int> && borrowed_range<Rng>
constexpr range_reference_t< Rng > ranges::index_fn::operator() ( Rng &&  rng,
Int  n 
) const
constexpr
Returns
begin(rng)[n]