#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
◆ EnumRange()
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
};
do_stuff(enumvalue); // will be called twice, with arguments red and yellow
}
EnumRangeT< EnumType > EnumRange(EnumType begin, EnumType one_past_end)
Definition: EnumIterator.h:188
Definition at line 188 of file EnumIterator.h.
Referenced by TestEnumIterator::testRangeForRange(), and ProxyProtocol::Header::toMime().