A STL-compliant vector container, offering reference stability.
It might be seen identical to boost::stable_vector, although both are very different. What can we say about stable_vector?
Basic usage:
stable_vector<A> va;
va.emplace_back();
A& a = va.back();
// client code can safely store the reference
Notify(a);
Here, we are using the second template parameter (that defaults to 4096) to change the size of the chunk used as underlying storage:
stable_vector<A, 1024> va;
std::cout << va.capacity(); // prints 1024
256 followers · starred May 2023
C++
93.4%
CMake
6.6%
A STL-compliant vector container, offering reference stability.
It might be seen identical to boost::stable_vector, although both are very different. What can we say about stable_vector?
Basic usage:
stable_vector<A> va;
va.emplace_back();
A& a = va.back();
// client code can safely store the reference
Notify(a);
Here, we are using the second template parameter (that defaults to 4096) to change the size of the chunk used as underlying storage:
stable_vector<A, 1024> va;
std::cout << va.capacity(); // prints 1024
256 followers · starred May 2023
C++
93.4%
CMake
6.6%