Range-v3 Range algorithms, views, and actions for the Standard Library |

Public Member Functions | List of all members
ranges::at_fn Struct Reference
Range

## Description

Checked indexed range access.

## Public Member Functions
template<typename Rng >
constexpr range_reference_t< Rng > | operator() (Rng &&rng, range_difference_t< Rng > n) const

## Member Function Documentation

## ◆ operator()()

template<typename Rng >

constexpr range_reference_t<Rng> ranges::at_fn::operator() | ( | Rng && | rng,
|  | range_difference_t< Rng > | n
| ) |  | const
| constexpr

Returns
  `begin(rng)[n]`

Precondition
  requires `random_access_range<Rng> && sized_range<Rng> && borrowed_range<Rng>`