13template<
typename T,
typename vec = std::vector<T>>
17 typedef typename decltype(underlying)::iterator iterator_type;
18 typedef typename decltype(underlying)::const_iterator const_iterator_type;
19 typedef typename decltype(underlying)::size_type index_type;
20 typedef typename decltype(underlying)::size_type size_type;
27 inline const_iterator_type
erase(iterator_type it){
28 *it = std::move(underlying.back());
29 underlying.pop_back();
44 inline const_iterator_type
erase(
const T& value){
45 auto it = std::find(underlying.begin(),underlying.end(),value);
57 underlying.push_back(value);
58 return underlying.back();
67 template<
typename ... A>
69 underlying.emplace_back(std::forward<A>(args)...);
70 return underlying.back();
73 inline T& operator[](index_type idx){
74 return underlying[idx];
77 const inline T& operator[](index_type idx)
const{
78 return underlying[idx];
81 inline T& at(index_type idx){
82 return underlying.at(idx);
85 const inline T& at(index_type idx)
const{
86 return underlying.at(idx);
89 inline const_iterator_type begin()
const{
90 return underlying.begin();
93 inline const_iterator_type end()
const{
94 return underlying.end();
97 inline iterator_type end(){
98 return underlying.end();
101 inline iterator_type begin(){
102 return underlying.begin();
105 inline size_type size()
const{
106 return underlying.size();
109 inline void reserve(
size_t num){
110 underlying.reserve(num);
113 inline void resize(
size_t num){
114 underlying.resize(num);
117 inline bool empty()
const{
118 return underlying.empty();
125 inline auto data()
const{
126 return underlying.data();
Definition unordered_vector.hpp:14
const_iterator_type erase(const T &value)
Definition unordered_vector.hpp:44
const_iterator_type erase(iterator_type it)
Definition unordered_vector.hpp:27
auto & get_underlying()
Definition unordered_vector.hpp:36
T & emplace(A &&... args)
Definition unordered_vector.hpp:68
T & insert(const T &value)
Definition unordered_vector.hpp:56
Definition Animation.hpp:6