span: Add Span::empty() and use it in script/descriptor

This commit is contained in:
MarcoFalke
2020-07-19 20:53:08 +02:00
parent fa8a992589
commit fa2ae0ac8d
2 changed files with 4 additions and 3 deletions

View File

@@ -151,6 +151,7 @@ public:
return m_data[m_size - 1];
}
constexpr std::size_t size() const noexcept { return m_size; }
constexpr bool empty() const noexcept { return size() == 0; }
CONSTEXPR_IF_NOT_DEBUG C& operator[](std::size_t pos) const noexcept
{
ASSERT_IF_DEBUG(size() > pos);