Checked indexed range access.
More...
#include <operations.hpp>
|
| template (typename Rng, typename Int)(AND integral< Int > AND borrowed_range< Rng >) const expr range_reference_t< Rng > operator()(Rng &&rng |
|
| RANGES_EXPECT (0<=static_cast< D >(n)) |
|
| RANGES_EXPECT (!(bool) sized_range< Rng >||static_cast< D >(n)< ranges::distance(rng)) |
|
return | ranges::begin (rng)[static_cast< D >(n)] |
|
Checked indexed range access.
- See also
at_fn
Unchecked indexed range access.
◆ template()
ranges::index_fn::template |
( |
typename Rng |
, |
|
|
typename Int |
|
|
) |
| const && |
◆ const
Int n ranges::index_fn::const |
Initial value:{
using D = range_difference_t<Rng>
The documentation for this struct was generated from the following file: