54 if (m_freeIndices.size() > 0) {
55 uint32_t index = m_freeIndices.back();
56 m_freeIndices.pop_back();
59 m_entries[index].isLive =
true;
61 return { index, m_entries[index].generation };
64 if (m_entries.size() + 1 >= std::numeric_limits<uint32_t>::max()) {
65 throw std::length_error(std::string(
"Maximum number of values inside GenerationalIndexArray reached: ") + std::to_string(m_entries.size()));
68 m_entries.push_back({
true, 0 });
69 return {
static_cast<uint32_t>(m_entries.size()) - 1, 0 };