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

Checked indexed range access. More...

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

Public Member Functions

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

Detailed Description

Checked indexed range access.

Member Function Documentation

◆ operator()()

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