Indexed_array¶
-
template<typename Value, typename Indexer>
class indexed_array¶ Container that encapsulate a fixed size array, whose elements are accessible using a custom indexing mechanism instead of a zero-based integer indexing. It is an aggregate type and intend to be a drop-in replacement for
std::array
. The storage is guaranted to be contiguous, and can be accessed as a C-array.
Construction and destruction¶
Constructors |
|
---|---|
Default construction |
|
Copy and move constructors |
|
Aggregate-like initialization |
|
Safe initialization |
|
Construction by copy of an array |
|
Operators |
|
Copy / move assignment |
Destructor is explicitly defaulted.
Member functions¶
Data Access¶
Standard std::array members |
|
---|---|
Index-based element access |
|
Access to first element |
|
Access to last element |
|
Access to raw content |
|
Additional members |
|
Returns a view on the lower-rank content. |
|
Access to the underlying data.
Iteration |
|
---|---|
Iterator to the start of the array |
|
Iterator to the end of the array (past last element) |
|
Reverse iterator to the “beginning” of the array |
|
Reverse iterator to the “end” of the array |
Observers¶
std::array members |
|
---|---|
Checks if container is empty |
|
Returns the size of the array
( |
|
Fills the array with value |
|
Swap two indexed_array contents |
|
extensions |
|
Checks if an index is in the acceptable range |
|
Tells if element access is O(1) |
|