rangeless::fn
rangeless::fn::impl::seq< Gen > Class Template Reference

#include <fn.hpp>

Classes

class  iterator
 

Public Types

using value_type = typename Gen::value_type
 

Public Member Functions

 seq (Gen gen)
 
template<typename OtherGen >
 seq (seq< OtherGen > other)
 
 seq (const seq &)=delete
 
seqoperator= (const seq &)=delete
 
 seq (seq &&)=default
 
seqoperator= (seq &&)=default
 
iterator begin ()
 
seqset_resumable (bool res=true)
 
Gen & get_gen ()
 
const Gen & get_gen () const
 
 operator std::vector< value_type > () &&
 

Static Public Member Functions

static iterator end ()
 

Friends

class iterator
 
template<typename U >
class seq
 

Detailed Description

template<typename Gen>
class rangeless::fn::impl::seq< Gen >

Single-pass InputRange-adapter for nullary generators.

Definition at line 410 of file fn.hpp.

Member Typedef Documentation

◆ value_type

template<typename Gen>
using rangeless::fn::impl::seq< Gen >::value_type = typename Gen::value_type

Definition at line 426 of file fn.hpp.

Constructor & Destructor Documentation

◆ seq() [1/4]

template<typename Gen>
rangeless::fn::impl::seq< Gen >::seq ( Gen  gen)
inline

Definition at line 429 of file fn.hpp.

◆ seq() [2/4]

template<typename Gen>
template<typename OtherGen >
rangeless::fn::impl::seq< Gen >::seq ( seq< OtherGen >  other)
inline

Definition at line 444 of file fn.hpp.

◆ seq() [3/4]

template<typename Gen>
rangeless::fn::impl::seq< Gen >::seq ( const seq< Gen > &  )
delete

◆ seq() [4/4]

template<typename Gen>
rangeless::fn::impl::seq< Gen >::seq ( seq< Gen > &&  )
default

Member Function Documentation

◆ begin()

template<typename Gen>
iterator rangeless::fn::impl::seq< Gen >::begin ( )
inline

Definition at line 531 of file fn.hpp.

◆ end()

template<typename Gen>
static iterator rangeless::fn::impl::seq< Gen >::end ( )
inlinestatic

Definition at line 547 of file fn.hpp.

◆ get_gen() [1/2]

template<typename Gen>
Gen& rangeless::fn::impl::seq< Gen >::get_gen ( )
inline

Definition at line 573 of file fn.hpp.

◆ get_gen() [2/2]

template<typename Gen>
const Gen& rangeless::fn::impl::seq< Gen >::get_gen ( ) const
inline

Definition at line 578 of file fn.hpp.

◆ operator std::vector< value_type >()

template<typename Gen>
rangeless::fn::impl::seq< Gen >::operator std::vector< value_type > ( ) &&
inline

Definition at line 583 of file fn.hpp.

◆ operator=() [1/2]

template<typename Gen>
seq& rangeless::fn::impl::seq< Gen >::operator= ( const seq< Gen > &  )
delete

◆ operator=() [2/2]

template<typename Gen>
seq& rangeless::fn::impl::seq< Gen >::operator= ( seq< Gen > &&  )
default

◆ set_resumable()

template<typename Gen>
seq& rangeless::fn::impl::seq< Gen >::set_resumable ( bool  res = true)
inline

By default, calling begin() a second time will throw, because the default expectation is that begin() will restart from the beginning, which does not hold with seq, or any input-range for that matter. This may be suppressed with .resumable(true), making it explicit that the user-code is aware that begin() will resume from the current state.

Definition at line 568 of file fn.hpp.

Friends And Related Function Documentation

◆ iterator

template<typename Gen>
friend class iterator
friend

Definition at line 607 of file fn.hpp.

◆ seq

template<typename Gen>
template<typename U >
friend class seq
friend

Definition at line 611 of file fn.hpp.


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