#include <Containers/SmallVector.h>
template<typename T>
SmallVectorTemplateBase<T, true> class
SmallVector method implementations that are designed to work with trivially copyable types
Base classes
-
template<typename T>class SmallVectorTemplateCommon<T>
- SmallVector part which does not depend on whether the type is a POD
Constructors, destructors, conversion operators
-
SmallVectorTemplateBase(std::
size_t size) protected
Public functions
- void push_back(ValueParamT elt)
- void pop_back()
Protected types
-
using ValueParamT = std::
conditional_t<TakesParamByValue, T, const T&> - Either
const T&
orT
, depending on whether it's cheap enough to take parameters by value.
Protected static functions
- static void destroy_range(T*, T*)
-
template<typename It1, typename It2>static void uninitialized_move(It1 i, It1 e, It2 dest)
- Move the range [I, E) onto the uninitialized memory starting with
Dest
, constructing elements into it as needed. -
template<typename It1, typename It2>static void uninitialized_copy(It1 i, It1 e, It2 dest)
- Copy the range [I, E) onto the uninitialized memory starting with
Dest
, constructing elements into it as needed. -
template<typename T1, typename T2>static void uninitialized_copy(T1* i, T1* e, T2* dest, std::
enable_if_t<std:: is_same<std:: remove_const_t<T1>, T2>::value>* = nullptr) - Copies the range [I, E) onto the uninitialized memory starting with
Dest
, constructing elements into it as needed. - static auto forward_value_param(ValueParamT v) -> ValueParamT
- Copies
V
or return a reference, depending on ValueParamT.
Protected functions
-
void grow(std::
size_t minSize = 0) - Doubles the size of the allocated memory, guaranteeing space for at least one more element or
MinSize
if specified. -
auto reserveForParamAndGetAddress(const T& elt,
std::
size_t n = 1) -> const T* - Reserves enough space to add one element, and return the updated element pointer in case it was a reference to the storage.
-
auto reserveForParamAndGetAddress(T& elt,
std::
size_t n = 1) -> T* -
void growAndAssign(std::
size_t numElts, T elt) -
template<typename ... ArgTypes>auto growAndEmplaceBack(ArgTypes && ... args) -> T&
Protected static variables
- static bool TakesParamByValue constexpr
- Whether it's cheap enough to take parameters by value.
Function documentation
template<typename T>
T* Death:: Containers:: SmallVectorTemplateBase<T, true><T>:: reserveForParamAndGetAddress(T& elt,
std:: size_t n = 1) protected
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.