Vcsn  2.2
Be Rational
vcsn::container_range< C > Struct Template Reference

Restrict the interface of a container to begin/end. More...

#include <fwd.hh>

Collaboration diagram for vcsn::container_range< C >:

Public Types

using unref_C = typename std::remove_reference< C >::type
 
using value_type = typename unref_C::value_type
 
using const_iterator = typename unref_C::const_iterator
 

Public Member Functions

 container_range (const unref_C &cont)
 
auto begin () const -> decltype(this->cont_.begin())
 
auto end () const -> decltype(this->cont_.end())
 
auto front () const -> decltype(this->cont_.front())
 The first element. More...
 
auto back () const -> decltype(this->cont_.back())
 The last element. More...
 
auto empty () const -> decltype(this->cont_.empty())
 
auto size () const -> decltype(this->cont_.size())
 

Private Attributes

const C cont_
 

Detailed Description

template<typename C>
struct vcsn::container_range< C >

Restrict the interface of a container to begin/end.

Definition at line 11 of file fwd.hh.

Member Typedef Documentation

template<typename C >
using vcsn::container_range< C >::const_iterator = typename unref_C::const_iterator

Definition at line 19 of file crange.hh.

template<typename C >
using vcsn::container_range< C >::unref_C = typename std::remove_reference<C>::type

Definition at line 16 of file crange.hh.

template<typename C >
using vcsn::container_range< C >::value_type = typename unref_C::value_type

Definition at line 17 of file crange.hh.

Constructor & Destructor Documentation

template<typename C >
vcsn::container_range< C >::container_range ( const unref_C cont)
inline

Definition at line 23 of file crange.hh.

Member Function Documentation

template<typename C >
auto vcsn::container_range< C >::back ( ) const -> decltype(this->cont_. back ())
inline

The last element.

Precondition
!empty().

Definition at line 40 of file crange.hh.

template<typename C >
auto vcsn::container_range< C >::begin ( ) const -> decltype(this->cont_. begin ())
inline

Definition at line 33 of file crange.hh.

template<typename C >
auto vcsn::container_range< C >::empty ( ) const -> decltype(this->cont_. empty ())
inline

Definition at line 41 of file crange.hh.

template<typename C >
auto vcsn::container_range< C >::end ( ) const -> decltype(this->cont_. end ())
inline

Definition at line 34 of file crange.hh.

template<typename C >
auto vcsn::container_range< C >::front ( ) const -> decltype(this->cont_. front ())
inline

The first element.

Precondition
!empty().

Definition at line 37 of file crange.hh.

template<typename C >
auto vcsn::container_range< C >::size ( ) const -> decltype(this->cont_. size ())
inline

Definition at line 42 of file crange.hh.

Member Data Documentation

template<typename C >
const C vcsn::container_range< C >::cont_
private

Definition at line 21 of file crange.hh.


The documentation for this struct was generated from the following files: