From 0bcfd50a44b4c13eefa31ee2bc6407b332c2b31d Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Wed, 8 Jun 2022 23:15:51 -0700 Subject: [PATCH] I s2g I will make Stallman have a Nice Time --- quicktex/util/ranges.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/quicktex/util/ranges.h b/quicktex/util/ranges.h index d5611a7..82f52aa 100644 --- a/quicktex/util/ranges.h +++ b/quicktex/util/ranges.h @@ -94,6 +94,8 @@ template constexpr auto map(const Seq &input, Fn op) template class index_iterator_base { public: + friend D; + typedef long long difference_type; D &operator++() { @@ -146,10 +148,10 @@ template class index_iterator_base { auto &operator[](difference_type i) { return *(static_cast(*this) + i); } auto operator[](difference_type i) const { return *(static_cast(*this) + i); } - private: + protected: size_t _index; - friend D; + private: index_iterator_base(size_t index = 0) : _index(index) {} }; @@ -159,8 +161,6 @@ template class const_iterator : public index_iterator_base> { typedef long long difference_type; typedef range_value_t value_type; - friend base; - index_iterator() : base(0), _range(nullptr) {} index_iterator(R &range, size_t index) : base(index), _range(&range) {}