template <typename T, size_t N, typename SizeType = uint32_t>
class small_vector
Defined at line 132 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
A vector class with "small string optimization" -- meaning that the class contains a fixed working store for N elements.
Useful in in situations where the needed size is unknown, but the typical size is known If size increases beyond the
fixed capacity, a dynamically allocated working store is created.
NOTE: Unlike std::vector which only requires T to be CopyAssignable and CopyConstructable, small_vector requires T to be
MoveAssignable and MoveConstructable
NOTE: Unlike std::vector, iterators are invalidated by move assignment between small_vector objects effectively the
"small string" allocation functions as an incompatible allocator.
Public Members
static const size_type kSmallCapacity
static const size_type kMaxCapacity
Protected Members
size_type size_
size_type capacity_
BackingStore[N] small_store_
std::unique_ptr<BackingStore[]> large_store_
value_type * working_store_
Public Methods
void small_vector<T, N, SizeType> ()
Defined at line 146 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void small_vector<T, N, SizeType> (std::initializer_list<T> list)
Defined at line 148 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void small_vector<T, N, SizeType> (const small_vector<T, N, SizeType> & other)
Defined at line 150 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void small_vector<T, N, SizeType> (small_vector<T, N, SizeType> && other)
Defined at line 152 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void small_vector<T, N, SizeType> (size_type size, const value_type & value)
Defined at line 162 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void ~small_vector<T, N, SizeType> ()
Defined at line 172 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
bool operator== (const small_vector<T, N, SizeType> & rhs)
Defined at line 174 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
bool operator!= (const small_vector<T, N, SizeType> & rhs)
Defined at line 186 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
small_vector<T, N, SizeType> & operator= (const small_vector<T, N, SizeType> & other)
Defined at line 188 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
small_vector<T, N, SizeType> & operator= (small_vector<T, N, SizeType> && other)
Defined at line 222 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
reference operator[] (size_type pos)
Defined at line 263 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_reference operator[] (size_type pos)
Defined at line 267 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
reference front ()
Like std::vector:: calling front or back on an empty container causes undefined behavior
Defined at line 273 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_reference front ()
Defined at line 277 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
reference back ()
Defined at line 281 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_reference back ()
Defined at line 285 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
bool empty ()
Defined at line 290 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
template <class... Args>
void emplace_back (Args &&... args)
Defined at line 293 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
template <typename Container>
void PushBackFrom (const Container & from)
Note: probably should update this to reflect C++23 ranges
Defined at line 302 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
template <typename Container>
void PushBackFrom (Container && from)
Defined at line 317 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void reserve (size_type new_cap)
Defined at line 330 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void clear ()
Defined at line 348 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void resize (size_type count)
Defined at line 360 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void resize (size_type count, const value_type & value)
Defined at line 367 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void shrink_to_fit ()
Defined at line 369 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
iterator begin ()
Defined at line 395 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_iterator cbegin ()
Defined at line 396 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_iterator begin ()
Defined at line 397 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
iterator end ()
Defined at line 399 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_iterator cend ()
Defined at line 400 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_iterator end ()
Defined at line 401 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
size_type size ()
Defined at line 402 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
auto capacity ()
Defined at line 403 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
pointer data ()
Defined at line 405 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_pointer data ()
Defined at line 406 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
Protected Methods
const_pointer ComputeWorkingStore ()
Defined at line 409 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
pointer ComputeWorkingStore ()
Defined at line 415 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void UpdateWorkingStore ()
Defined at line 422 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
const_pointer GetWorkingStore ()
Defined at line 424 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
pointer GetWorkingStore ()
Defined at line 428 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
pointer GetSmallStore ()
Defined at line 433 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h
void DbgWorkingStoreCheck ()
Defined at line 451 of file ../../third_party/Vulkan-ValidationLayers/src/layers/containers/custom_containers.h