ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
EnumIterator< TEnum, TEnableIf > Struct Template Reference

Description:

template<typename TEnum, typename TEnableIf>
struct alib::enums::EnumIterator< TEnum, TEnableIf >

Implements a std::iterator_traits class for scoped and non-scoped enum types. The documentation is found with TMP struct T_EnumIsIterable , which needs to be specialized for template type TEnum . For other types, this class is not constructible.

Template Parameters
TEnumThe enum type to iterate over.
TEnableIfThis parameter has a default expressions and must not be provided with specializations of this struct. It is used internally to ensure that only if a specialization of T_EnumIsIterable exists, this class is available.

Definition at line 214 of file iterable.hpp.

#include <iterable.hpp>

Inner Type Index:

class  TRandomAccessIterator
 

Public Type Index:

using ConstIterator = TRandomAccessIterator<const TEnum*, const TEnum&>
 

Public Method Index:

 EnumIterator ()=default
 
ConstIterator begin () const
 
ConstIterator end () const
 

Type Definition Details:

◆ ConstIterator

template<typename TEnum , typename TEnableIf >
using ConstIterator = TRandomAccessIterator<const TEnum*, const TEnum&>

The constant iterator exposed by this class. A Mutable version is not available.

Definition at line 449 of file iterable.hpp.

Constructor(s) / Destructor Details::

◆ EnumIterator()

template<typename TEnum , typename TEnableIf >
EnumIterator ( )
default

Default constructor.

Method Details:

◆ begin()

template<typename TEnum , typename TEnableIf >
ConstIterator begin ( ) const
inline

Returns an iterator referring to the start of enumeration TEnum .

Returns
The start of the enumeration.

Definition at line 456 of file iterable.hpp.

Here is the call graph for this function:

◆ end()

template<typename TEnum , typename TEnableIf >
ConstIterator end ( ) const
inline

Returns an iterator referring the first illegal value of enumeration TEnum .

Returns
The end of the enumeration.

Definition at line 468 of file iterable.hpp.

Here is the call graph for this function:

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