|
| template<size_t Nmax2> |
| | StackVector (const StackVector< T, Nmax2 > &vec) |
| | Copy constructor which allows construction from smaller StackVector types. More...
|
| |
| | StackVector () |
| | Default constructor. More...
|
| |
| | StackVector (std::initializer_list< T > _list) |
| | Array initialisation constructor. More...
|
| |
| Base::reference | back () |
| | Returns a reference to the last element stored in the container. More...
|
| |
| Base::const_reference | back () const |
| | Returns a reference to the last element stored in the container. More...
|
| |
| Base::const_iterator | cend () const |
| | Returns a const iterator pointing to the end of the container. More...
|
| |
| Base::const_reverse_iterator | crbegin () const |
| | Returns a const reverse iterator pointing to the start of the container. More...
|
| |
| Base::const_reverse_iterator | crend () const |
| | Returns a const reverse iterator pointing to the end of the container. More...
|
| |
| constexpr bool | empty () const |
| | Test if the container is empty. More...
|
| |
| Base::iterator | end () |
| | Returns an iterator pointing to the end of the container. More...
|
| |
| Base::const_iterator | end () const |
| | Returns an iterator pointing to the end of the container. More...
|
| |
| template<size_t Nmax2> |
| void | extend (const StackVector< T, Nmax2 > &ovec) |
| | Merge the contents of another StackVector into this one. More...
|
| |
| T | pop_back () |
| | Removes and returns the last element of the container. More...
|
| |
| void | push_back (const T &val) |
| | Add an element to the end of the container. More...
|
| |
| Base::reverse_iterator | rbegin () |
| | Returns a reverse iterator pointing to the start of the container. More...
|
| |
| Base::const_reverse_iterator | rbegin () const |
| | Returns a reverse iterator pointing to the start of the container. More...
|
| |
| Base::reverse_iterator | rend () |
| | Returns a reverse iterator pointing to the end of the container. More...
|
| |
| Base::const_reverse_iterator | rend () const |
| | Returns a reverse iterator pointing to the end of the container. More...
|
| |
| constexpr Base::size_type | size () const |
| | The number of elements currently stored. More...
|
| |
template<class T, size_t Nmax>
class stator::orphan::StackVector< T, Nmax >
This class impersonates a STL vector, but its storage is allocated on the stack. this allows the simplicity of a vector without the overhead of dynamic memory allocation. It is usually used to return small arrays of values (e.g., a list of roots) where a maximum number of elements can be calculated at compile time.
- Template Parameters
-
| T | The stored data type. |
| Nmax | The maximum number of elements to be stored in the container. |
Definition at line 44 of file stack_vector.hpp.