13#ifndef CXXUTILS_RANGE_WITH_AT_H
14#define CXXUTILS_RANGE_WITH_AT_H
39 decltype(
auto)
at (
size_t i)
41 if (i >= std::size(*
this))
47 decltype(
auto)
at (
size_t i)
const
49 if (i >= std::size(*
this))
57template <std::ranges::input_range SPAN,
class XFORM>
Add at() methods to a range class.
decltype(auto) at(size_t i)
const_iterator begin() const
Return a begin iterator.
range_with_at< std::ranges::transform_view< SPAN, XFORM > > transform_view_with_at
Helper to add at() methods to a transform_view.
const_iterator end() const
Return an end iterator.
bool operator[](bit_t bit) const
Return the value of one bit.
void throw_out_of_range(const std::string &what, size_t index, size_t size, const void *obj)
Throw an out_of_range exception.
Helpers for throwing out_of_range exceptions.