sarray: add an empty
query
This commit is contained in:
parent
1550529a39
commit
cf141e45d2
@ -99,6 +99,14 @@ namespace cruft {
|
|||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
bool empty (void) const
|
||||||
|
{
|
||||||
|
return m_size == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
T& operator[] (std::size_t i)& { return m_data.objects[i]; }
|
T& operator[] (std::size_t i)& { return m_data.objects[i]; }
|
||||||
const T& operator[] (std::size_t i) const& { return m_data.objects[i]; }
|
const T& operator[] (std::size_t i) const& { return m_data.objects[i]; }
|
||||||
|
Loading…
Reference in New Issue
Block a user