Public Member Functions | Private Attributes | List of all members
triton_span::Span< T > Class Template Reference

#include <Span.h>

Public Member Functions

 Span (T begin, T end)
 
begin () const
 
end () const
 
bool empty () const
 
auto size () const
 
auto const & operator[] (std::size_t idx) const
 
auto const & front () const
 
auto const & back () const
 

Private Attributes

const T begin_
 
const T end_
 

Detailed Description

template<class T>
class triton_span::Span< T >

Definition at line 16 of file Span.h.

Constructor & Destructor Documentation

template<class T>
triton_span::Span< T >::Span ( begin,
end 
)
inline

Definition at line 18 of file Span.h.

18 : begin_(begin), end_(end) {}
T begin() const
Definition: Span.h:20
T end() const
Definition: Span.h:21
const T end_
Definition: Span.h:33
const T begin_
Definition: Span.h:32

Member Function Documentation

template<class T>
auto const& triton_span::Span< T >::back ( ) const
inline

Definition at line 29 of file Span.h.

29 { return *(end_ - 1); }
const T end_
Definition: Span.h:33
template<class T>
T triton_span::Span< T >::begin ( ) const
inline

Definition at line 20 of file Span.h.

20 { return begin_; }
const T begin_
Definition: Span.h:32
template<class T>
bool triton_span::Span< T >::empty ( ) const
inline

Definition at line 23 of file Span.h.

23 { return begin_ == end_; }
const T end_
Definition: Span.h:33
const T begin_
Definition: Span.h:32
template<class T>
T triton_span::Span< T >::end ( void  ) const
inline

Definition at line 21 of file Span.h.

21 { return end_; }
const T end_
Definition: Span.h:33
template<class T>
auto const& triton_span::Span< T >::front ( ) const
inline

Definition at line 28 of file Span.h.

28 { return *begin_; }
const T begin_
Definition: Span.h:32
template<class T>
auto const& triton_span::Span< T >::operator[] ( std::size_t  idx) const
inline

Definition at line 26 of file Span.h.

26 { return *(begin_ + idx); }
const T begin_
Definition: Span.h:32
template<class T>
auto triton_span::Span< T >::size ( void  ) const
inline

Definition at line 24 of file Span.h.

24 { return end_ - begin_; }
const T end_
Definition: Span.h:33
const T begin_
Definition: Span.h:32

Member Data Documentation

template<class T>
const T triton_span::Span< T >::begin_
private

Definition at line 32 of file Span.h.

template<class T>
const T triton_span::Span< T >::end_
private

Definition at line 33 of file Span.h.


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