halcheck 1.0
Loading...
Searching...
No Matches
halcheck::lib::subrange< I > Class Template Reference

Describes a range formed from a pair of iterators. More...

#include <subrange.hpp>

Inheritance diagram for halcheck::lib::subrange< I >:
halcheck::lib::view_interface< subrange< I > >

Public Member Functions

constexpr subrange ()=default
 Constructs an empty subrange.
 
constexpr subrange (I first, I last)
 Constructs a subrange from a pair of iterators.
 
constexpr I begin () const
 Gets an iterator pointing at the first element in the subrange.
 
constexpr I end () const
 Gets an iterator pointing past the last element in the subrange.
 
constexpr bool empty () const
 
constexpr bool empty () const
 
bool empty ()
 
bool empty ()
 
constexpr operator bool () const
 
 operator bool ()
 
constexpr auto size () const -> decltype(lib::to_unsigned(lib::end(self< T >()) - lib::begin(self< T >())))
 
auto size () -> decltype(lib::to_unsigned(lib::end(self< T >()) - lib::begin(self< T >())))
 
constexpr auto front () const -> decltype(*lib::begin(self< T >()))
 
auto front () -> decltype(*lib::begin(self< T >()))
 
constexpr auto back () const -> decltype(*std::prev(lib::end(self< T >())))
 
auto back () -> decltype(*std::prev(lib::end(self< T >())))
 
constexpr auto operator[] (lib::range_difference_t< T > n) const -> decltype(lib::begin(self< T >())[n])
 
auto operator[] (lib::range_difference_t< T > n) -> decltype(lib::begin(self< T >())[n])
 

Detailed Description

template<typename I>
class halcheck::lib::subrange< I >

Describes a range formed from a pair of iterators.

Template Parameters
IThe type of iterator contained in the subrange.

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