0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 08:54:02 +01:00

ircd::buffer: Add array operators.

This commit is contained in:
Jason Volk 2017-09-22 15:49:32 -07:00
parent 9acdb31349
commit ed59ef6e8e

View file

@ -109,6 +109,16 @@ struct ircd::buffer::buffer
auto &end() const { return std::get<1>(*this); }
auto &end() { return std::get<1>(*this); }
auto &operator[](const size_t &i) const
{
return *(begin() + i);
}
auto &operator[](const size_t &i)
{
return *(begin() + i);
}
buffer(const it &start, const it &stop)
:std::tuple<it, it>{start, stop}
{}