Operator list

This commit is contained in:
Jakub Melka
2019-02-10 18:32:15 +01:00
parent 9264ea70c1
commit b01a135dfd
4 changed files with 191 additions and 3 deletions

View File

@ -104,6 +104,24 @@ public:
}
}
void clear()
{
m_flatBlockEndIterator = m_flatBlock.begin();
m_variableBlock.clear();
}
void push_back(T object)
{
if (m_flatBlockEndIterator != m_flatBlock.cend())
{
*m_flatBlockEndIterator++ = std::move(object);
}
else
{
m_variableBlock.emplace_back(std::move(object));
}
}
private:
size_t getFlatBlockSize() const { return std::distance(m_flatBlock.cbegin(), std::array<T, FlatSize>::const_iterator(m_flatBlockEndIterator)); }