SOMHunter Core
ioterable< NumericType > Struct Template Reference

Until C++20 and ranges come. More...

#include <common.h>

Public Types

using iterator_category = std::bidirectional_iterator_tag
 
using value_type = NumericType
 
using difference_type = NumericType
 
using pointer = std::add_pointer_t< NumericType >
 
using reference = NumericType
 

Public Member Functions

 ioterable (NumericType n)
 
 ioterable ()=default
 
 ioterable (ioterable &&)=default
 
 ioterable (ioterable const &)=default
 
ioterableoperator= (ioterable &&)=default
 
ioterableoperator= (ioterable const &)=default
 
ioterableoperator++ ()
 
ioterable operator++ (int)
 
bool operator== (ioterable const &other) const
 
bool operator!= (ioterable const &other) const
 
value_type operator* () const
 

Private Attributes

NumericType val_ { std::numeric_limits<NumericType>::max() }
 

Detailed Description

template<typename NumericType>
struct ioterable< NumericType >

Until C++20 and ranges come.

Copied from here: https://stackoverflow.com/a/63341946/5481153

Member Typedef Documentation

◆ difference_type

template<typename NumericType >
using ioterable< NumericType >::difference_type = NumericType

◆ iterator_category

template<typename NumericType >
using ioterable< NumericType >::iterator_category = std::bidirectional_iterator_tag

◆ pointer

template<typename NumericType >
using ioterable< NumericType >::pointer = std::add_pointer_t<NumericType>

◆ reference

template<typename NumericType >
using ioterable< NumericType >::reference = NumericType

◆ value_type

template<typename NumericType >
using ioterable< NumericType >::value_type = NumericType

Constructor & Destructor Documentation

◆ ioterable() [1/4]

template<typename NumericType >
ioterable< NumericType >::ioterable ( NumericType  n)
inlineexplicit

◆ ioterable() [2/4]

template<typename NumericType >
ioterable< NumericType >::ioterable ( )
default

◆ ioterable() [3/4]

template<typename NumericType >
ioterable< NumericType >::ioterable ( ioterable< NumericType > &&  )
default

◆ ioterable() [4/4]

template<typename NumericType >
ioterable< NumericType >::ioterable ( ioterable< NumericType > const &  )
default

Member Function Documentation

◆ operator!=()

template<typename NumericType >
bool ioterable< NumericType >::operator!= ( ioterable< NumericType > const &  other) const
inline

◆ operator*()

template<typename NumericType >
value_type ioterable< NumericType >::operator* ( ) const
inline

◆ operator++() [1/2]

template<typename NumericType >
ioterable& ioterable< NumericType >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename NumericType >
ioterable ioterable< NumericType >::operator++ ( int  )
inline

◆ operator=() [1/2]

template<typename NumericType >
ioterable& ioterable< NumericType >::operator= ( ioterable< NumericType > &&  )
default

◆ operator=() [2/2]

template<typename NumericType >
ioterable& ioterable< NumericType >::operator= ( ioterable< NumericType > const &  )
default

◆ operator==()

template<typename NumericType >
bool ioterable< NumericType >::operator== ( ioterable< NumericType > const &  other) const
inline

Member Data Documentation

◆ val_

template<typename NumericType >
NumericType ioterable< NumericType >::val_ { std::numeric_limits<NumericType>::max() }
private

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