19template <
typename T,
typename Tuple>
20auto &MEM_GetAllocContainer(Tuple &t)
22 return std::get<std::array<T*, T::PoolSize>>(t);
25template <
typename T,
typename MemTuple>
26T *MEM_AllocItem(MemTuple *m)
29 auto &cont = MEM_GetAllocContainer<T>(*m);
31 auto i = std::find_if(std::begin(cont), std::end(cont), [](
const auto &i) {
return i !=
nullptr; });
43template <
typename T,
typename MemTuple>
44void MEM_DeallocItem(T *priv, MemTuple *m)
47 auto &cont = MEM_GetAllocContainer<T>(*m);
48 auto i = std::find(std::begin(cont), std::end(cont),
nullptr);