|
WPILibC++
2020.3.2
|
This is all the non-templated stuff common to all SmallVectors. More...
#include <SmallVector.h>
Public Member Functions | |
| LLVM_ATTRIBUTE_ALWAYS_INLINE size_t | size () const |
| LLVM_ATTRIBUTE_ALWAYS_INLINE size_t | capacity () const |
| LLVM_NODISCARD bool | empty () const |
| void | set_size (size_t Size) |
Set the array size to N, which the current array must have enough capacity for. More... | |
Protected Member Functions | |
| SmallVectorBase (void *FirstEl, size_t Capacity) | |
| void | grow_pod (void *FirstEl, size_t MinCapacity, size_t TSize) |
| This is an implementation of the grow() method which only works on POD-like data types and is out of line to reduce code duplication. | |
Protected Attributes | |
| void * | BeginX |
| unsigned | Size = 0 |
| unsigned | Capacity |
This is all the non-templated stuff common to all SmallVectors.
|
inline |
Set the array size to N, which the current array must have enough capacity for.
This does not construct or destroy any elements in the vector.
Clients can use this in conjunction with capacity() to write past the end of the buffer when they know that more elements are available, and only update the size later. This avoids the cost of value initializing elements which will only be overwritten.