#include <userver/utils/fixed_array.hpp>
A fixed-size array with the size determined at runtime.
The array allows initializing each of the array elements with the same parameters:
The array also allows initializing each of the array elements with the output of a generator funtion:
Definition at line 28 of file fixed_array.hpp.
Public Types | |
| using | iterator = T* |
| using | const_iterator = const T* |
Public Member Functions | |
| FixedArray ()=default | |
| Make an empty array. | |
| template<class... Args> | |
| FixedArray (std::size_t size, Args &&... args) | |
| Make an array and initialize each element with "args". | |
| FixedArray (FixedArray &&other) noexcept | |
| FixedArray & | operator= (FixedArray &&other) noexcept |
| FixedArray (const FixedArray &)=delete | |
| FixedArray & | operator= (const FixedArray &)=delete |
| std::size_t | size () const noexcept |
| bool | empty () const noexcept |
| const T & | operator[] (std::size_t i) const noexcept |
| T & | operator[] (std::size_t i) noexcept |
| T & | front () noexcept |
| const T & | front () const noexcept |
| T & | back () noexcept |
| const T & | back () const noexcept |
| T * | data () noexcept |
| const T * | data () const noexcept |
| T * | begin () noexcept |
| T * | end () noexcept |
| const T * | begin () const noexcept |
| const T * | end () const noexcept |
| const T * | cbegin () const noexcept |
| const T * | cend () const noexcept |
| template<class GeneratorFunc> | |
| FixedArray (impl::InternalTag, std::size_t size, GeneratorFunc &&generator) | |
| using utils::FixedArray< T >::const_iterator = const T* |
Definition at line 31 of file fixed_array.hpp.
| using utils::FixedArray< T >::iterator = T* |
Definition at line 30 of file fixed_array.hpp.
|
explicit |
Make an array and initialize each element with "args".
Definition at line 112 of file fixed_array.hpp.
|
noexcept |
Definition at line 152 of file fixed_array.hpp.
| utils::FixedArray< T >::~FixedArray | ( | ) |
Definition at line 163 of file fixed_array.hpp.
| utils::FixedArray< T >::FixedArray | ( | impl::InternalTag | , |
| std::size_t | size, | ||
| GeneratorFunc && | generator ) |
Definition at line 131 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 65 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 64 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 72 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 70 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 74 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 75 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 68 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 67 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 49 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 73 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 71 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 62 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 61 of file fixed_array.hpp.
|
noexcept |
Definition at line 156 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 51 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 56 of file fixed_array.hpp.
|
inlinenoexcept |
Definition at line 48 of file fixed_array.hpp.