|
ReallocFunc | GetRealloc () const noexcept |
| Gets the specified realloc function. More...
|
|
bool | push_back (const T &v) noexcept |
| Adds an element to the vector. More...
|
|
bool | pop_back () noexcept |
| Deletes an element from the end of the vector. More...
|
|
T & | operator[] (size_t idx) |
| Gets the nth element, where n is specified by idx. More...
|
|
const T & | operator[] (size_t idx) const |
| The const decoration version of the above function.
|
|
T & | front () |
| Gets a reference to the first element.
|
|
const T & | front () const |
| The const decoration version of the above function.
|
|
T & | back () |
| Gets a reference to the last element.
|
|
const T & | back () const |
| The const decoration version of the above function.
|
|
iterator | begin () noexcept |
| Gets the iterator pointing to the first element.
|
|
const_iterator | begin () const noexcept |
| Gets the read-only iterator pointing to the first element.
|
|
const_iterator | cbegin () const noexcept |
| Gets the read-only iterator pointing to the first element.
|
|
iterator | end () noexcept |
| Gets the iterator pointing beyond the last element.
|
|
const_iterator | end () const noexcept |
| Gets the read-only iterator pointing beyond the last element.
|
|
const_iterator | cend () const noexcept |
| Gets the read-only iterator pointing beyond the last element.
|
|
reverse_iterator | rbegin () noexcept |
| Gets the reverse iterator pointing to the last element.
|
|
const_reverse_iterator | rbegin () const noexcept |
| Gets the read-only reverse iterator pointing to the last element.
|
|
reverse_iterator | rend () noexcept |
| Gets the reverse iterator pointing ahead of the first element.
|
|
const_reverse_iterator | rend () const noexcept |
| Gets the read-only reverse iterator pointing ahead of the first element.
|
|
const_reverse_iterator | crbegin () const noexcept |
| Gets the read-only reverse iterator pointing to the last element.
|
|
const_reverse_iterator | crend () const noexcept |
| Gets the read-only reverse iterator pointing ahead of the first element.
|
|
size_t | size () const noexcept |
| Returns the number of stored elements.
|
|
size_t | capacity () const noexcept |
| Gets the maximum number of elements that can be stored without reallocating memory. More...
|
|
bool | empty () const noexcept |
| Returns true if the number of stored elements is 0, or returns false otherwise.
|
|
bool | reserve (size_t n) noexcept |
| Makes it possible to store as many as n elements without reallocating memory. More...
|
|
bool | resize (size_t n) noexcept |
| Changes the number of elements. More...
|
|
void | clear () noexcept |
| Empties the vector. Note that the memory remains allocated.
|
|
void | shrink_to_fit () noexcept |
| Adjusts the size of allocated memory to exactly fit the current number of elements.
|
|
iterator | insert (iterator pos, const T &val) |
| Inserts an element in the position specified by pos. More...
|
|
|
constexpr | ReallocVec () noexcept |
| Uses std::realloc with the default constructor.
|
|
constexpr | ReallocVec (ReallocFunc func) noexcept |
| Enables the user to specify the realloc function with the constructor. More...
|
|
| ReallocVec (ReallocVec &&rhs) noexcept |
| Instantiates the object (move constructor).
|
|
ReallocVec & | operator= (ReallocVec &&rhs) noexcept |
| Move assignment operator.
|
|
template<class T>
class nn::nlib::ReallocVec< T >
The class for realloc
-based implementations of vectors with POD
-type elements.
- Template Parameters
-
T | The element type. This type must be POD . |
- Description
- T must be aligned to an alignment guaranteed by
realloc
.
Definition at line 32 of file ReallocVec.h.