mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-16 00:46:03 +08:00
32 lines
587 B
Markdown
32 lines
587 B
Markdown
---
|
|
title: "multi_vector"
|
|
weight: 2
|
|
---
|
|
|
|
A fixed capacity multi-dimensional vector.
|
|
|
|
For C++11 or greater only.
|
|
|
|
```cpp
|
|
etl::multi_vector<typename T, const size_t Dx...>
|
|
```
|
|
|
|
## Description
|
|
|
|
The `etl::multi_vector` class is defined as a recursive variadic template.
|
|
It defines a multi-dimensional array class based on nested `etl::vector` definitions.
|
|
|
|
## Example
|
|
|
|
```cpp
|
|
etl::multi_vector<int, 2, 3, 4>
|
|
```
|
|
|
|
is equivalent to
|
|
|
|
```cpp
|
|
etl::vector<etl::vector<etl::vector<int, 4>, 3>, 2>
|
|
```
|
|
|
|
Each dimension of an `etl::multi_vector` supports all of the members of an `etl::vector`.
|