mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::vector_view: Add front() and back() convenience accessors.
This commit is contained in:
parent
36bd89098d
commit
625a2bcf6f
1 changed files with 10 additions and 0 deletions
|
@ -59,6 +59,16 @@ struct ircd::vector_view
|
|||
return operator[](pos);
|
||||
}
|
||||
|
||||
value_type &back() const
|
||||
{
|
||||
return at(size() - 1);
|
||||
}
|
||||
|
||||
value_type &front() const
|
||||
{
|
||||
return at(0);
|
||||
}
|
||||
|
||||
vector_view(value_type *const &start, value_type *const &stop)
|
||||
:_data{start}
|
||||
,_stop{stop}
|
||||
|
|
Loading…
Reference in a new issue