18 using iterator_category = std::random_access_iterator_tag;
20 using difference_type = V;
22 using const_pointer = V
const *;
23 using reference = V &;
24 using const_reference = V
const &;
27 typedef std::ptrdiff_t diff_t;
30 operator+=(diff_t step) {
39 operator-=(diff_t step) {
48 operator+(diff_t step) {
49 iterator new_ = _this();
55 operator-(diff_t step) {
56 iterator new_ = _this();
62 operator-(iterator first) {
64 while (first != _this()) {
85 iterator new_ = _this();
94 iterator new_ = _this();
102 operator*() {
return *_this().get(); }
104 operator*()
const {
return *_this().get(); }
107 operator->() {
return &*_this(); }
109 operator->()
const {
return &*_this(); }
112 operator!=(
const iterator &other)
const {
113 return !(_this() == other);
117 operator<(
const iterator &other)
const {
118 return !(_this() >= other);
122 operator>=(
const iterator &other)
const {
123 return _this() == other || _this() > other;
127 operator<=(
const iterator &other)
const {
128 return _this() == other || _this() < other;
132 operator==(
const iterator &other)
const {
return _this().eq(other); };
134 operator>(
const iterator &other)
const {
return _this().gt(other); }
138 _this() {
return *
static_cast<iterator *
>(
this); }
140 _this()
const {
return *
static_cast<const iterator *
>(
this); }
150 _begin(begin), _end(end), _pos(begin) {}
163 if (_pos == _begin) {
172 return *_pos == *other._pos;