A Vector that can hold up to N elements inline and > N on heap.
More...
#include <Vector.h>
Public Member Functions | |
| SmallVector (SegmentAllocator allocator=SegmentAllocator::Global) noexcept | |
| SmallVector (const SmallVector &other) noexcept | |
| SmallVector (SmallVector &&other) noexcept | |
| SmallVector & | operator= (const SmallVector &other) noexcept |
| SmallVector & | operator= (SmallVector &&other) noexcept |
| SmallVector (const Vector< T > &other) noexcept | |
| SmallVector (Vector< T > &&other) noexcept | |
| SmallVector (std::initializer_list< T > list) noexcept | |
Public Member Functions inherited from SC::Vector< T > | |
| template<typename U > | |
| bool | contains (const U &value, size_t *index=nullptr) const noexcept |
| Check if the current array contains a given value. | |
| template<typename Lambda > | |
| bool | find (Lambda &&lambda, size_t *index=nullptr) const noexcept |
| Finds the first item in array matching criteria given by the lambda. | |
| template<typename Lambda > | |
| bool | removeAll (Lambda &&criteria) noexcept |
| Removes all items matching criteria given by Lambda. | |
| template<typename U > | |
| bool | remove (const U &value) noexcept |
Removes all values equal to value | |
Protected Member Functions | |
| SmallVector (int num, SegmentAllocator allocator) | |
Additional Inherited Members | |
Public Types inherited from SC::Vector< T > | |
| using | Parent = Segment<detail::VectorVTable<T>> |
A Vector that can hold up to N elements inline and > N on heap.
| T | Type of single vector element |
| N | Number of elements kept inline to avoid heap allocation |
SC::SmallVector is like SC::Vector but it will do heap allocation once more than N elements are needed.
When the size() becomes less than N the container will switch back using memory coming from inline storage.