Data Structures | |
| class | const_iterator |
| Nonmodifiable data iterator. More... | |
Public Types | |
Types | |
| using | value_type = T |
Public Member Functions | |
| PURITY_WEAK constexpr iterator | begin () noexcept |
| PURITY_WEAK constexpr iterator | end () noexcept |
| constexpr const_iterator | begin () const noexcept |
| constexpr const_iterator | end () const noexcept |
| constexpr | operator std::array< T, nItems > () const |
| Implicit conversion operator to a std::array. | |
| constexpr std::array< T, nItems > | getArray () const |
| Explicit conversion to a std::array. | |
Special member functions | |
| template<std::size_t... Inds> | |
| constexpr | Array (const Array &other, std::index_sequence< Inds...>) |
| Helper copy constructor. More... | |
| constexpr | Array (const Array &other) |
| Copy constructor. More... | |
Converting constructors | |
| template<size_t... Inds> | |
| constexpr | Array (const std::array< T, nItems > &other, std::index_sequence< Inds...>) |
| Delegate std::array ctor, using same trick as copy ctor. | |
| constexpr | Array (const std::array< T, nItems > &other) |
| Construct from std::array using same trick as copy ctor. More... | |
Private Member Functions | |
| template<size_t... Inds> | |
| constexpr std::array< T, nItems > | makeArray_ (std::index_sequence< Inds...>) const |
Private Attributes | |
| T | items_ [nItems] |
|
inline |
Helper copy constructor.
Constructs using another Array and an index_sequence to directly form the array mem-initializer with a parameter pack expansion
Complexity \(\Theta(N)\)
|
inline |
Copy constructor.
Constructing from another array is tricky since we're technically not allowed to edit items_ in-class, so we delegate to a helper constructor and directly form the mem-initializer
Complexity \(\Theta(N)\)
|
inline |
Construct from std::array using same trick as copy ctor.
Complexity \(\Theta(N)\)