Define cstring_tie::end()

std::ranges::range<T> requires that T provide a reasonable `end()`.
cstring_tie did not provide one since it uses private inheritance of
`std::array`.  However, it can provide a reasonable one, so define that
here.
This commit is contained in:
Kp 2022-10-09 23:15:20 +00:00
parent bb0711001f
commit 1f8a54a334

View file

@ -25,6 +25,10 @@ public:
unsigned count() const { return m_count; }
const char *string(std::size_t i) const { return this->operator[](i); }
using array_t::begin;
auto end() const
{
return std::next(begin(), m_count);
}
private:
unsigned m_count;
};