libkazv
RangeT< T > Class Template Reference

A RangeT is an ordered collection that can be iterated through. More...

#include <range-t.hpp>

Public Types

using DataT = T
 The type of items in this range. More...
 

Public Member Functions

auto begin () const
 The beginning iterator of this range. More...
 
auto end () const
 The past-end iterator of this range. More...
 
const DataTat (std::size_t index) const
 Get the item at index with bound-checking. More...
 
const DataToperator[] (std::size_t index) const
 Get the item at index without bound-checking. More...
 

Detailed Description

template<class T>
class RangeT< T >

A RangeT is an ordered collection that can be iterated through.

Warning
This is an interface, not an actual class in the library.

Member Typedef Documentation

◆ DataT

template<class T >
using RangeT< T >::DataT = T

The type of items in this range.

Member Function Documentation

◆ at()

template<class T >
const DataT& RangeT< T >::at ( std::size_t  index) const

Get the item at index with bound-checking.

If there is no such index, it will throw.

◆ begin()

template<class T >
auto RangeT< T >::begin ( ) const

The beginning iterator of this range.

◆ end()

template<class T >
auto RangeT< T >::end ( ) const

The past-end iterator of this range.

◆ operator[]()

template<class T >
const DataT& RangeT< T >::operator[] ( std::size_t  index) const

Get the item at index without bound-checking.

If there is no such index, it might return a default-constructed instance, or it might be undefined behaviour.


The documentation for this class was generated from the following file: