EnumIterator.h File Reference
#include <iterator>
#include <type_traits>
Include dependency graph for EnumIterator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EnumIteratorBase< EnumType >
 
class  EnumIterator< EnumType >
 
class  ReverseEnumIterator< EnumType >
 
class  EnumRangeT< EnumType >
 
class  WholeEnum< EnumType >
 

Functions

template<typename EnumType >
EnumRangeT< EnumType > EnumRange (EnumType begin, EnumType one_past_end)
 

Function Documentation

template<typename EnumType >
EnumRangeT<EnumType> EnumRange ( EnumType  begin,
EnumType  one_past_end 
)

Generate a continuous range of an enum for range-for expressions

convenience function to deduce the right type for instantiating EnumRangeT. See EnumRangeT for more detailed documentation and caveats.

Typical use:

enum class EnumType {
blue, red, yellow, green, pink
};
for (auto enumvalue : EnumRange(EnumType::red,EnumType::green)) {
do_stuff(enumvalue); // will be called twice, with arguments red and yellow
}

Definition at line 186 of file EnumIterator.h.

Referenced by testEnumIterator::testRangeForRange().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors