mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 04:33:59 +01:00
span: Add Span::empty() and use it in script/descriptor
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user