sarray: add an empty query

This commit is contained in:
Danny Robson 2020-07-22 13:27:32 +10:00
parent 1550529a39
commit cf141e45d2

View File

@ -99,6 +99,14 @@ namespace cruft {
return m_size;
}
//---------------------------------------------------------------------
bool empty (void) const
{
return m_size == 0;
}
//---------------------------------------------------------------------
T& operator[] (std::size_t i)& { return m_data.objects[i]; }
const T& operator[] (std::size_t i) const& { return m_data.objects[i]; }