Fixed‐size array indexed by values of a scoped enumeration.
Synopsis
Declared in <llvm/ADT/EnumeratedArray.h>
template<
typename ValueType,
typename Enumeration,
Enumeration LargestEnum = Enumeration::Last,
typename IndexType = int,
IndexType Size = 1 + static_cast<IndexType>(LargestEnum)>
class EnumeratedArray;
Description
The array holds one element per enumerator from zero through LargestEnum (inclusive). Indexing uses the enumeration type rather than a raw integer.
Type Aliases
Name |
Description |
Const iterator over the stored elements. |
|
Const pointer to an element. |
|
Const reference to an element. |
|
Const reverse iterator over the stored elements. |
|
Mutable iterator over the stored elements. |
|
Mutable pointer to an element. |
|
Mutable reference to an element. |
|
Mutable reverse iterator over the stored elements. |
|
Element type stored in the array. |
Member Functions
Name |
Description |
|
Constructors |
|
|
Return true if the array has zero elements. |
|
|
|
Subscript operators |
|
|
|
|
|
Return the number of elements in the array. |
Template Parameters
Name |
Description |
ValueType |
Element type stored in the array. |
Enumeration |
Scoped enum used as the index type. |
LargestEnum |
Last enumerator; determines the array size. |
IndexType |
Underlying integer type used for indexing and size. |
Size |
Number of elements (defaults to |
Created with MrDocs