Lumiera  0.pre.03
»edit your freedom«
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 635 of file itertools.hpp.

Public Member Functions

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

Private Types

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

Additional Inherited Members

- Public Types inherited from IterTool< SingleValCore< VAL > >
typedef SingleValCore< VAL > ::pointer pointer
 
typedef SingleValCore< VAL > ::reference reference
 
typedef SingleValCore< VAL > ::value_type value_type
 
- Protected Member Functions inherited from IterTool< SingleValCore< VAL > >
void _maybe_throw () const
 
bool hasData () const
 
bool iterate ()
 
- Protected Attributes inherited from IterTool< SingleValCore< VAL > >
SingleValCore< VAL > core_
 
+ Inheritance diagram for SingleValIter< VAL >:
+ Collaboration diagram for SingleValIter< VAL >:

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