4#ifndef TETL_CONTAINER_INDEX_HPP
5#define TETL_CONTAINER_INDEX_HPP
7#include <etl/_concepts/emulation.hpp>
8#include <etl/_contracts/check.hpp>
9#include <etl/_cstddef/ptrdiff_t.hpp>
10#include <etl/_iterator/begin.hpp>
11#include <etl/_iterator/end.hpp>
12#include <etl/_utility/forward.hpp>
14namespace etl::detail {
18template <
typename Range,
typename Index>
19 requires(RandomAccessRange<Range>)
20constexpr auto index(Range&& rng, Index&& i)
noexcept ->
decltype(
auto)
25 TETL_PRECONDITION(
static_cast<etl::ptrdiff_t>(i) < (end(rng) - begin(rng)));
26 return begin(
etl::forward<Range>(rng))[
etl::forward<Index>(i)];
Definition adjacent_find.hpp:9