#include <Containers/SmallVector.h>
template<typename T>
SmallVectorImpl class
Consists of common code of SmallVector class to reduce code duplication based on N
template parameter.
Base classes
-
template<typename T, bool = (std::class SmallVectorTemplateBase<T>
is_trivially_copy_constructible<T>::value)&& (std:: is_trivially_move_constructible<T>::value)&& std:: is_trivially_destructible<T>::value> - SmallVector method implementations that are designed to work with non-trivial types
Derived classes
-
template<typename T, unsigned N = CalculateSmallVectorDefaultInlinedElements<T>::value>class SmallVector
- Memory-optimized vector.
Public types
- using iterator = typename SuperClass::iterator
- using const_iterator = typename SuperClass::const_iterator
- using reference = typename SuperClass::reference
-
using size_type = typename SuperClass::
size_type
Constructors, destructors, conversion operators
- SmallVectorImpl(unsigned n) protected explicit
- SmallVectorImpl(const SmallVectorImpl&) deleted
- ~SmallVectorImpl()
Public functions
- void clear()
- void resize(size_type n)
- void resize_for_overwrite(size_type n)
- Like resize, but T is POD, the new values won't be initialized.
- void truncate(size_type n)
- Like resize, but requires that
N
is less than size() - void resize(size_type n, ValueParamT nv)
- void reserve(size_type n)
- void pop_back_n(size_type numItems)
- auto pop_back_val() -> T
- void swap(SmallVectorImpl& other)
-
template<typename in_iter, typename = std::void append(in_iter inStart, in_iter inEnd)
enable_if_t<std:: is_convertible< typename std:: iterator_traits<in_iter>::iterator_category, std:: input_iterator_tag>::value>> - Adds the specified range to the end of the vector.
- void append(size_type numInputs, ValueParamT elt)
- Appends
NumInputs
copies ofElt
to the end. -
void append(std::
initializer_list<T> il) - void append(const SmallVectorImpl& other)
- void assign(size_type numElts, ValueParamT elt)
-
template<typename in_iter, typename = std::void assign(in_iter inStart, in_iter inEnd)
enable_if_t<std:: is_convertible< typename std:: iterator_traits<in_iter>::iterator_category, std:: input_iterator_tag>::value>> -
void assign(std::
initializer_list<T> il) - void assign(const SmallVectorImpl& other)
- auto erase(const_iterator ci) -> iterator
- auto erase(const_iterator cs, const_iterator ce) -> iterator
- void erase(size_type index)
- auto eraseUnordered(const_iterator ci) -> iterator
- void eraseUnordered(size_type index)
- auto insert(iterator i, T&& elt) -> iterator
- auto insert(iterator i, const T& elt) -> iterator
- auto insert(iterator i, size_type numToInsert, ValueParamT elt) -> iterator
-
template<typename ItTy, typename = std::auto insert(iterator i, ItTy from, ItTy to) -> iterator
enable_if_t<std:: is_convertible< typename std:: iterator_traits<ItTy>::iterator_category, std:: input_iterator_tag>::value>> -
void insert(iterator i,
std::
initializer_list<T> il) -
template<typename ... ArgTypes>auto emplace_back(ArgTypes && ... args) -> reference
- auto operator=(const SmallVectorImpl& other) -> SmallVectorImpl&
- auto operator=(SmallVectorImpl&& other) -> SmallVectorImpl&
- auto operator==(const SmallVectorImpl& other) const -> bool
- auto operator!=(const SmallVectorImpl& other) const -> bool
- auto operator<(const SmallVectorImpl& other) const -> bool
- auto operator>(const SmallVectorImpl& other) const -> bool
- auto operator<=(const SmallVectorImpl& other) const -> bool
- auto operator>=(const SmallVectorImpl& other) const -> bool
Protected types
- using ValueParamT = typename SuperClass::ValueParamT
Protected functions
- void assignRemote(SmallVectorImpl&& other)