Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
SingleValIter< VAL > Class Template Reference

#include "lib/itertools.hpp"

Description

template<class VAL>
class lib::SingleValIter< VAL >

Pseudo-Iterator to yield just a single value.

When incremented, the value is destroyed and the Iterator transitions to exhausted state.

Remarks
as such might look nonsensical, but proves useful when a function yields an iterator, while producing an explicit value in some special case.
Template Parameters
VALanything, value or reference to store

Definition at line 626 of file itertools.hpp.

Public Member Functions

 SingleValIter ()
 
 SingleValIter (VAL &&something)
 
- Public Member Functions inherited from IterTool< SingleValCore< VAL > >
 IterTool (SingleValCore< VAL > &&setup)
 
 operator bool () const
 
reference operator* () const
 
pointer operator-> () const
 
IterTooloperator++ ()
 
bool isValid () const
 
bool empty () const
 

Private Types

using _ValHolder = SingleValCore< VAL >
 
using _IteratorImpl = IterTool< _ValHolder >
 

Additional Inherited Members

- Public Types inherited from IterTool< SingleValCore< VAL > >
using pointer = CORE::pointer
 
using reference = CORE::reference
 
using value_type = CORE::value_type
 
- Protected Member Functions inherited from IterTool< SingleValCore< VAL > >
bool hasData () const
 
bool iterate ()
 
void _maybe_throw () const
 
- Protected Attributes inherited from IterTool< SingleValCore< VAL > >
SingleValCore< VAL > core_
 

Constructor & Destructor Documentation

◆ SingleValIter() [1/2]

template<class VAL >
SingleValIter ( )
inline

Definition at line 633 of file itertools.hpp.

◆ SingleValIter() [2/2]

template<class VAL >
SingleValIter ( VAL &&  something)
inline

Definition at line 637 of file itertools.hpp.

Member Typedef Documentation

◆ _ValHolder

template<class VAL >
using _ValHolder = SingleValCore<VAL>
private

Definition at line 629 of file itertools.hpp.

◆ _IteratorImpl

template<class VAL >
using _IteratorImpl = IterTool<_ValHolder>
private

Definition at line 630 of file itertools.hpp.

+ Inheritance diagram for SingleValIter< VAL >:
+ Collaboration diagram for SingleValIter< VAL >:

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