view: add ssize query
This commit is contained in:
parent
52467c056d
commit
da6d5cb2a8
10
view.hpp
10
view.hpp
@ -276,6 +276,16 @@ namespace cruft {
|
||||
return static_cast<size_type> (std::distance (m_begin, m_end));
|
||||
}
|
||||
|
||||
|
||||
///--------------------------------------------------------------------
|
||||
/// Returns a signed count of items in the view.
|
||||
constexpr ssize_t
|
||||
ssize (void) const noexcept
|
||||
{
|
||||
return std::distance (m_begin, m_end);
|
||||
}
|
||||
|
||||
|
||||
///--------------------------------------------------------------------
|
||||
/// Returns a subview of the first `count` elements of this view.
|
||||
[[nodiscard]] constexpr auto
|
||||
|
Loading…
Reference in New Issue
Block a user